summaryrefslogtreecommitdiffstats
path: root/core/prebuilt_internal.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2014-05-22 02:38:52 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-22 02:38:52 +0000
commit78ae0ad8df1773cda70a5d27b826408d60b25c7b (patch)
tree2d10afe0c91bd23f24eff8a03eb71087a574dc0b /core/prebuilt_internal.mk
parent70917bcebc5d0e14162e441d12ee8c8f928763df (diff)
parent913e031793928981640f51fa2e6480312f044c37 (diff)
downloadbuild-78ae0ad8df1773cda70a5d27b826408d60b25c7b.zip
build-78ae0ad8df1773cda70a5d27b826408d60b25c7b.tar.gz
build-78ae0ad8df1773cda70a5d27b826408d60b25c7b.tar.bz2
am 913e0317: am a72e6f80: am 8a3f514d: Merge "Split the rules to build the odex file"
* commit '913e031793928981640f51fa2e6480312f044c37': Split the rules to build the odex file
Diffstat (limited to 'core/prebuilt_internal.mk')
-rw-r--r--core/prebuilt_internal.mk16
1 files changed, 10 insertions, 6 deletions
diff --git a/core/prebuilt_internal.mk b/core/prebuilt_internal.mk
index 184ebb0..b248e1f 100644
--- a/core/prebuilt_internal.mk
+++ b/core/prebuilt_internal.mk
@@ -159,11 +159,6 @@ LOCAL_DEX_PREOPT := false
# defines built_odex along with rule to install odex
include $(BUILD_SYSTEM)/dex_preopt_odex_install.mk
#######################################
-ifdef LOCAL_DEX_PREOPT
-$(built_module): PRIVATE_BUILT_ODEX := $(built_odex)
-# built_odex is byproduct of LOCAL_BUILT_MODULE without its own build recipe.
-$(built_odex) : $(LOCAL_BUILT_MODULE)
-endif # LOCAL_DEX_PREOPT
# Sign and align non-presigned .apks.
$(built_module) : $(my_prebuilt_src_file) | $(ACP) $(ZIPALIGN) $(SIGNAPK_JAR)
$(transform-prebuilt-to-target)
@@ -174,10 +169,19 @@ ifneq ($(LOCAL_CERTIFICATE),PRESIGNED)
$(sign-package)
endif
ifdef LOCAL_DEX_PREOPT
- $(call dexpreopt-one-file,$@,$(PRIVATE_BUILT_ODEX))
+ifneq (nostripping,$(LOCAL_DEX_PREOPT))
+ $(call dexpreopt-remove-classes.dex,$@)
+endif
endif
$(align-package)
+###############################
+## Rule to build the odex file
+ifdef LOCAL_DEX_PREOPT
+$(built_odex) : $(my_prebuilt_src_file)
+ $(call dexpreopt-one-file,$<,$@)
+endif
+
else # LOCAL_MODULE_CLASS != APPS
ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),)
$(built_module) : $(my_prebuilt_src_file)