OSDN Git Service

Fix pattern rules for $(installed_odex) for libdvm.
authorYing Wang <wangying@google.com>
Wed, 28 May 2014 20:34:59 +0000 (13:34 -0700)
committerYing Wang <wangying@google.com>
Wed, 28 May 2014 21:23:26 +0000 (14:23 -0700)
When the VM is libdvm, we don't put the odex files in an arch specific
subdirectory. The previous pattern rules don't work because of the extra
"/". With this change, % evaluates to empty string when it's built for
libdvm; % evaluates to "<arch_name>/" when it's built for libart.
Also removed use of $(create-empty-package), which may causes file name
(dummy) conflict with the rule of package.apk.

Bug: 15311527
Change-Id: I9f9089bc1896b78c1f47834afdb28a3a51d34480

core/dex_preopt_odex_install.mk
core/package_internal.mk

index db23140..713f595 100644 (file)
@@ -117,8 +117,8 @@ endif # boot jar
 ifdef built_odex
 # Use pattern rule - we may have multiple installed odex files.
 # Ugly syntax - See the definition get-odex-file-path.
-$(installed_odex) : $(dir $(LOCAL_INSTALLED_MODULE))%/$(notdir $(word 1,$(installed_odex))) \
-                  : $(dir $(LOCAL_BUILT_MODULE))%/$(notdir $(word 1,$(built_odex))) \
+$(installed_odex) : $(dir $(LOCAL_INSTALLED_MODULE))%$(notdir $(word 1,$(installed_odex))) \
+                  : $(dir $(LOCAL_BUILT_MODULE))%$(notdir $(word 1,$(built_odex))) \
     | $(ACP)
        @echo "Install: $@"
        $(copy-file-to-target)
index cb1e424..5285616 100644 (file)
@@ -377,7 +377,7 @@ endif
 ifdef LOCAL_DEX_PREOPT
 $(built_odex): PRIVATE_DEX_FILE := $(built_dex)
 $(built_odex) : $(built_dex)
-       $(create-empty-package)
+       $(hide) mkdir -p $(dir $@) && rm -f $@
        $(add-dex-to-package)
        $(hide) mv $@ $@.input
        $(call dexpreopt-one-file,$@.input,$@)