diff options
author | Ying Wang <wangying@google.com> | 2012-08-30 12:59:42 -0700 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2012-08-30 12:59:42 -0700 |
commit | 3a6f7589e8fcc691ec768b1fdcbf0364ff4596f2 (patch) | |
tree | a83b4b4504d540ef52ef9edb1b1bffb90067b88b | |
parent | 565de5c97c49ece0e6dc8f95833956ae27afe598 (diff) | |
download | build-3a6f7589e8fcc691ec768b1fdcbf0364ff4596f2.zip build-3a6f7589e8fcc691ec768b1fdcbf0364ff4596f2.tar.gz build-3a6f7589e8fcc691ec768b1fdcbf0364ff4596f2.tar.bz2 |
Add LOCAL_DONT_DELETE_JAR_META_INF
To support to not delete META_INF directory from the static Java
libraries.
Change-Id: I720bfa059c43dd457a74a0c60bb6797aa408ecaf
-rw-r--r-- | core/clear_vars.mk | 2 | ||||
-rw-r--r-- | core/definitions.mk | 4 | ||||
-rw-r--r-- | core/java.mk | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/core/clear_vars.mk b/core/clear_vars.mk index a389915..343345f 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -125,6 +125,8 @@ LOCAL_ADDRESS_SANITIZER:= LOCAL_JAR_EXCLUDE_FILES:= LOCAL_LINT_FLAGS:= LOCAL_SOURCE_FILES_ALL_GENERATED:= # '',true +# Don't delete the META_INF dir when merging static Java libraries. +LOCAL_DONT_DELETE_JAR_META_INF:= # Trim MAKEFILE_LIST so that $(call my-dir) doesn't need to # iterate over thousands of entries every time. diff --git a/core/definitions.mk b/core/definitions.mk index bc4886c..94a116c 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -1437,8 +1437,8 @@ define unzip-jar-files exit 1; \ fi; \ unzip -qo $$f -d $(2); \ - (cd $(2) && rm -rf META-INF); \ - done + done \ + $(if $(PRIVATE_DONT_DELETE_JAR_META_INF),,;rm -rf $(2)/META-INF) endef # Common definition to invoke javac on the host and target. diff --git a/core/java.mk b/core/java.mk index 0fccbd3..66f9a02 100644 --- a/core/java.mk +++ b/core/java.mk @@ -259,6 +259,7 @@ ALL_MODULES.$(LOCAL_MODULE).STUBS := $(full_classes_stubs_jar) # via deps on the target that generates the sources. $(full_classes_compiled_jar): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS) $(full_classes_compiled_jar): PRIVATE_JAR_EXCLUDE_FILES := $(LOCAL_JAR_EXCLUDE_FILES) +$(full_classes_compiled_jar): PRIVATE_DONT_DELETE_JAR_META_INF := $(LOCAL_DONT_DELETE_JAR_META_INF) $(full_classes_compiled_jar): $(java_sources) $(java_resource_sources) $(full_java_lib_deps) $(jar_manifest_file) \ $(RenderScript_file_stamp) $(proto_java_sources_file_stamp) $(transform-java-to-classes.jar) |