From 6e136922f3ec852c923070d60450191286a228d1 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 20 Feb 2018 14:31:33 -0800 Subject: [PATCH] Remove framework_res_package_export_deps framework_res_package_export is now always either the prebuilt android.jar from an SDK or a package-export.apk generated by Soong, so the dependency on R.stamp is never useful. Remove all assignments to framework_res_package_export_deps, and replace usages with frameworks_res_package_export. Test: m checkbuild Change-Id: If484e9eb08061cb0ed0697755f13db71d741aaab --- core/package_internal.mk | 9 +-------- core/prebuilt_internal.mk | 6 +----- core/static_java_library.mk | 8 ++------ 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/core/package_internal.mk b/core/package_internal.mk index cd3a7410a..0938c991f 100644 --- a/core/package_internal.mk +++ b/core/package_internal.mk @@ -465,7 +465,6 @@ $(foreach x,$(sharded_java_source_list_files),$(eval $(x): $(R_file_stamp))) endif # need_compile_res framework_res_package_export := -framework_res_package_export_deps := ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true) # Most packages should link against the resources defined by framework-res. @@ -477,15 +476,9 @@ else ifneq ($(filter-out current system_current test_current,$(LOCAL_SDK_RES_VER # for released sdk versions, the platform resources were built into android.jar. framework_res_package_export := \ $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_RES_VERSION)/android.jar -framework_res_package_export_deps := $(framework_res_package_export) else # LOCAL_SDK_RES_VERSION framework_res_package_export := \ $(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk -# We can't depend directly on the export.apk file; it won't get its -# PRIVATE_ vars set up correctly if we do. Instead, depend on the -# corresponding R.stamp file, which lists the export.apk as a dependency. -framework_res_package_export_deps := \ - $(dir $(framework_res_package_export))src/R.stamp endif # LOCAL_SDK_RES_VERSION endif # LOCAL_NO_STANDARD_LIBRARIES @@ -495,7 +488,7 @@ all_library_res_package_exports := \ $(call intermediates-dir-for,APPS,$(lib),,COMMON)/package-export.apk) all_library_res_package_export_deps := \ - $(framework_res_package_export_deps) \ + $(framework_res_package_export) \ $(foreach lib,$(LOCAL_RES_LIBRARIES),\ $(call intermediates-dir-for,APPS,$(lib),,COMMON)/src/R.stamp) $(resource_export_package) $(R_file_stamp) $(LOCAL_BUILT_MODULE): $(all_library_res_package_export_deps) diff --git a/core/prebuilt_internal.mk b/core/prebuilt_internal.mk index d4f552231..96e26137a 100644 --- a/core/prebuilt_internal.mk +++ b/core/prebuilt_internal.mk @@ -615,18 +615,14 @@ ifeq ($(LOCAL_SDK_RES_VERSION),) endif framework_res_package_export := -framework_res_package_export_deps := # Please refer to package.mk ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true) ifneq ($(filter-out current system_current test_current,$(LOCAL_SDK_RES_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current system_current test_current,$(LOCAL_SDK_RES_VERSION))),) framework_res_package_export := \ $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_RES_VERSION)/android.jar -framework_res_package_export_deps := $(framework_res_package_export) else framework_res_package_export := \ $(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk -framework_res_package_export_deps := \ - $(dir $(framework_res_package_export))src/R.stamp endif endif @@ -644,7 +640,7 @@ $(my_res_package): PRIVATE_DEFAULT_APP_TARGET_SDK := $(my_res_package): PRIVATE_PRODUCT_AAPT_CONFIG := $(my_res_package): PRIVATE_PRODUCT_AAPT_PREF_CONFIG := $(my_res_package): PRIVATE_TARGET_AAPT_CHARACTERISTICS := -$(my_res_package) : $(framework_res_package_export_deps) +$(my_res_package) : $(framework_res_package_export) full_android_manifest := my_res_resources := diff --git a/core/static_java_library.mk b/core/static_java_library.mk index 1dc0e7148..77bb498e9 100644 --- a/core/static_java_library.mk +++ b/core/static_java_library.mk @@ -103,18 +103,14 @@ ifeq ($(LOCAL_SDK_RES_VERSION),) endif framework_res_package_export := -framework_res_package_export_deps := # Please refer to package.mk ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true) ifneq ($(filter-out current system_current test_current,$(LOCAL_SDK_RES_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current system_current test_current,$(LOCAL_SDK_RES_VERSION))),) framework_res_package_export := \ $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_RES_VERSION)/android.jar -framework_res_package_export_deps := $(framework_res_package_export) else framework_res_package_export := \ $(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk -framework_res_package_export_deps := \ - $(dir $(framework_res_package_export))src/R.stamp endif endif @@ -175,10 +171,10 @@ my_generated_res_dirs_deps := $(RenderScript_file_stamp) endif # renderscript_target_api < 21 endif # renderscript_target_api is set include $(BUILD_SYSTEM)/aapt2.mk -$(my_res_package) : $(framework_res_package_export_deps) +$(my_res_package) : $(framework_res_package_export) else $(R_file_stamp): PRIVATE_RESOURCE_LIST := $(all_resources) -$(R_file_stamp) : $(all_resources) $(full_android_manifest) $(AAPT) $(framework_res_package_export_deps) +$(R_file_stamp) : $(all_resources) $(full_android_manifest) $(AAPT) $(framework_res_package_export) @echo "target R.java/Manifest.java: $(PRIVATE_MODULE) ($@)" $(create-resource-java-files) $(hide) find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name R.java | xargs cat > $@