summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Wei Huang <cwhuang@linux.org.tw>2013-04-15 09:12:19 (GMT)
committerGerrit Code Review <gerrit@cyanogenmod.org>2013-07-03 19:10:57 (GMT)
commit294ab115b287d31eb4c45ad1515be2d1158c8d4d (patch)
treee6529c46e2a7395bf101bb01275dbd948cf3c454
parent4c66ff45e65ba83c734396f472d32da7b1d41d1b (diff)
downloadbuild-294ab115b287d31eb4c45ad1515be2d1158c8d4d.zip
build-294ab115b287d31eb4c45ad1515be2d1158c8d4d.tar.gz
build-294ab115b287d31eb4c45ad1515be2d1158c8d4d.tar.bz2
Fix /system/app/$app.odex not updated issue
$(built_odex) depends on $(LOCAL_BUILT_MODULE) but doesn't have any build recipe. It is built by the rules of $(LOCAL_BUILT_MODULE) that results in a subtle bug: $(built_odex) is always newer than $(LOCAL_BUILT_MODULE) if $(LOCAL_BUILT_MODULE) rebuilt. Therefore 'make' thinks the targets (/system/app/$app.odex) depending on $(built_odex) don't need to be updated. It seems an allegedly optimization bug of 'make'. The simple fix is to explicitly add $(LOCAL_BUILT_MODULE) as a dependency of $(installed_odex). Conflicts: core/base_rules.mk Change-Id: Ia62695eeb9a9709f7115301cbf27eb1fd77a1573
-rw-r--r--core/base_rules.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 40d1fa6..4a58e49 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -510,7 +510,7 @@ endif
ifdef LOCAL_DEX_PREOPT
installed_odex := $(basename $(LOCAL_INSTALLED_MODULE)).odex
built_odex := $(basename $(LOCAL_BUILT_MODULE)).odex
-$(installed_odex) : $(built_odex) | $(ACP)
+$(installed_odex) : $(built_odex) $(LOCAL_BUILT_MODULE) | $(ACP)
@echo -e ${CL_CYN}"Install: $@"${CL_RST}
$(copy-file-to-target)