Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

build: 提交

build


Commit MetaInfo

修订版cb7e45cf4ab506a74244f189c703659e148edf4c (tree)
时间2013-04-17 16:58:16
作者Chih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

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).

更改概述

差异

--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -531,7 +531,7 @@ endif
531531 ifdef LOCAL_DEX_PREOPT
532532 installed_odex := $(basename $(LOCAL_INSTALLED_MODULE)).odex
533533 built_odex := $(basename $(LOCAL_BUILT_MODULE)).odex
534-$(installed_odex) : $(built_odex) | $(ACP)
534+$(installed_odex) : $(built_odex) $(LOCAL_BUILT_MODULE) | $(ACP)
535535 @echo "Install: $@"
536536 $(copy-file-to-target)
537537
Show on old repository browser