diff options
author | Chih-Wei Huang <cwhuang@linux.org.tw> | 2013-04-15 17:12:19 +0800 |
---|---|---|
committer | Chih-Wei Huang <cwhuang@android-x86.org> | 2013-04-17 16:00:40 +0800 |
commit | 868e0c5a00ea55f71bc624594723013bc092ffd5 (patch) | |
tree | 97ee1e9c66468b5ea703e787079e707c81d1d4ff | |
parent | 4996c8073e87dd9e361b385d8aeb121f4c36a221 (diff) | |
download | build-868e0c5a00ea55f71bc624594723013bc092ffd5.tar.gz |
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).
-rw-r--r-- | core/base_rules.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/base_rules.mk b/core/base_rules.mk index ed125fe018..b4791da43f 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -513,7 +513,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 "Install: $@" $(copy-file-to-target) |