Fix classes.jack extraction from platform.zip

The copy is handled by the common rule, so JAVA_dependency_template
really only needs to add the extra dependencies. Otherwise we were
getting duplicate rule warnings.

This may extract more files than necessary, but that's better than not
enough.

Bug: 26510884
Change-Id: I022f3cc6ddd1982af3f948740917ac03e795f4c5
This commit is contained in:
Yohann Roussel 2016-01-29 13:06:11 +01:00 committed by Dan Willemsen
parent 6c2a17e407
commit 00221d45e7

View file

@ -152,10 +152,8 @@ PDK_FUSION_OUT_DIR := $(DEBUG_OUT_DIR)
endif
define JAVA_dependency_template
$(PDK_FUSION_OUT_DIR)/$(strip $(1)): $(_pdk_fusion_intermediates)/$(strip $(1)) \
$(foreach d,$(2),$(PDK_FUSION_OUT_DIR)/$(d)) $(_pdk_fusion_stamp)
@mkdir -p $$(dir $$@)
$(hide) cp -fpPR $$< $$@
$(call add-dependency,$(PDK_FUSION_OUT_DIR)/$(strip $(1)),\
$(foreach d,$(filter $(2),$(_pdk_fusion_java_file_list)),$(PDK_FUSION_OUT_DIR)/$(d)))
endef
# needs explicit dependency as package-export.apk is not explicitly pulled
@ -174,7 +172,7 @@ $(foreach lib_dir,$(PDK_PLATFORM_JAVA_ZIP_JAVA_TARGET_LIB_DIR),\
$(lib_dir)/classes.jar $(lib_dir)/classes.jack)))
$(foreach lib_dir,$(PDK_PLATFORM_JAVA_ZIP_JAVA_TARGET_LIB_DIR),\
$(eval $(call JAVA_dependency_template,$(lib_dir)/classes.dex.toc,\
$(filter $(lib_dir)/classes%.dex, $(_pdk_fusion_java_file_list)))))
$(lib_dir)/classes.jar $(lib_dir)/classes.jack $(lib_dir)/classes%.dex)))
# implicit rules for all other target files
$(TARGET_COMMON_OUT_ROOT)/% : $(_pdk_fusion_intermediates)/target/common/% $(_pdk_fusion_stamp)