Merge changes I7b2fc184,I71f6fcaf

am: ea655a138f

Change-Id: Icd7c2390a0a35777bda0a93af534d6a4254fff9b
This commit is contained in:
Dan Willemsen 2017-10-02 20:46:14 +00:00 committed by android-build-merger
commit cd4d0d4cc3
5 changed files with 39 additions and 28 deletions

View File

@ -436,6 +436,12 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/symbols/sbin/adbd)
$(call add-clean-step, find $(SOONG_OUT_DIR)/.intermediates -name 'linux_x86*' | xargs rm -rf)
$(call add-clean-step, find $(SOONG_OUT_DIR)/.intermediates -name 'linux_common*' | xargs rm -rf)
# Remove old aidl/logtags files that may be in the generated source directory
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/*/*_intermediates/src)
$(call add-clean-step, rm -f $(OUT_DIR)/target/common/obj/*/*_intermediates/java-source-list)
$(call add-clean-step, rm -rf $(OUT_DIR)/host/common/obj/*/*_intermediates/src)
$(call add-clean-step, rm -f $(OUT_DIR)/host/common/obj/*/*_intermediates/java-source-list)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************

View File

@ -69,23 +69,11 @@ $(my_res_package): PRIVATE_OVERLAY_FLAT := $(my_static_library_resources) $(my_g
$(my_res_package): PRIVATE_SHARED_ANDROID_LIBRARIES := $(my_shared_library_resources)
$(my_res_package): PRIVATE_PROGUARD_OPTIONS_FILE := $(proguard_options_file)
$(my_res_package): PRIVATE_ASSET_DIRS := $(my_asset_dirs)
$(my_res_package): $(full_android_manifest) $(my_static_library_resources) $(my_shared_library_resources)
$(my_res_package): $(my_full_asset_paths)
$(my_res_package): $(my_res_resources_flat) $(my_overlay_resources_flat) \
$(my_generated_resources_flata) $(my_static_library_resources) \
$(AAPT2)
@echo "AAPT2 link $@"
$(call aapt2-link)
$(my_res_package): .KATI_IMPLICIT_OUTPUTS :=
ifdef R_file_stamp
$(R_file_stamp) : $(my_res_package) | $(ACP)
@echo "target R.java/Manifest.java: $(PRIVATE_MODULE) ($@)"
@rm -rf $@ && mkdir -p $(dir $@)
$(call find-generated-R.java)
endif
ifdef proguard_options_file
$(proguard_options_file) : $(my_res_package)
$(my_res_package): PRIVATE_R_FILE_STAMP := $(R_file_stamp)
$(my_res_package): .KATI_IMPLICIT_OUTPUTS += $(R_file_stamp)
endif
resource_export_package :=
@ -94,10 +82,27 @@ ifdef LOCAL_EXPORT_PACKAGE_RESOURCES
# other packages can use to build their own PRODUCT-agnostic R.java (etc.)
# files.
resource_export_package := $(intermediates.COMMON)/package-export.apk
$(R_file_stamp) : $(resource_export_package)
$(resource_export_package) : $(my_res_package) | $(ACP)
@echo "target Export Resources: $(PRIVATE_MODULE) $(@)"
$(copy-file-to-new-target)
$(my_res_package): PRIVATE_RESOURCE_EXPORT_PACKAGE := $(resource_export_package)
$(my_res_package): .KATI_IMPLICIT_OUTPUTS += $(resource_export_package)
endif
ifdef proguard_options_file
$(my_res_package): .KATI_IMPLICIT_OUTPUTS += $(proguard_options_file)
endif
$(my_res_package): $(full_android_manifest) $(my_static_library_resources) $(my_shared_library_resources)
$(my_res_package): $(my_full_asset_paths)
$(my_res_package): $(my_res_resources_flat) $(my_overlay_resources_flat) \
$(my_generated_resources_flata) $(my_static_library_resources) \
$(AAPT2)
@echo "AAPT2 link $@"
$(call aapt2-link)
ifdef R_file_stamp
@rm -f $(PRIVATE_R_FILE_STAMP)
$(call find-generated-R.java,$(PRIVATE_R_FILE_STAMP))
endif
ifdef LOCAL_EXPORT_PACKAGE_RESOURCES
@rm -f $(PRIVATE_RESOURCE_EXPORT_PACKAGE)
cp $@ $(PRIVATE_RESOURCE_EXPORT_PACKAGE)
endif

View File

@ -2048,7 +2048,7 @@ $(hide) $(AAPT_ASAN_OPTIONS) $(AAPT) package $(PRIVATE_AAPT_FLAGS) -m \
--skip-symbols-without-default-localization
endef
# Search for generated R.java/Manifest.java, copy the found R.java as $@.
# Search for generated R.java/Manifest.java, copy the found R.java as $1.
# Also copy them to a central 'R' directory to make it easier to add the files to an IDE.
define find-generated-R.java
$(hide) for GENERATED_MANIFEST_FILE in `find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) \
@ -2063,11 +2063,11 @@ $(hide) for GENERATED_R_FILE in `find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) \
mkdir -p $(TARGET_COMMON_OUT_ROOT)/R/$$dir; \
$(ACP) -fp $$GENERATED_R_FILE $(TARGET_COMMON_OUT_ROOT)/R/$$dir \
|| exit 31; \
$(ACP) -fp $$GENERATED_R_FILE $@ || exit 32; \
$(ACP) -fp $$GENERATED_R_FILE $1 || exit 32; \
done;
@# Ensure that the target file is always created, i.e. also in case we did not
@# enter the GENERATED_R_FILE-loop above. This avoids unnecessary rebuilding.
$(hide) touch $@
$(hide) touch $1
endef
###########################################################

View File

@ -306,7 +306,7 @@ LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
endif # LOCAL_SDK_VERSION
$(foreach s,$(aidl_sources),\
$(eval $(call define-aidl-java-rule,$(s),$(intermediates.COMMON),aidl_java_sources)))
$(eval $(call define-aidl-java-rule,$(s),$(intermediates.COMMON)/aidl,aidl_java_sources)))
$(foreach java,$(aidl_java_sources), \
$(call include-depfile,$(java:%.java=%.P),$(java)))
@ -338,11 +338,11 @@ include $(BUILD_SYSTEM)/base_rules.mk
###########################################################
ifneq ($(strip $(logtags_sources)),)
logtags_java_sources := $(patsubst %.logtags,%.java,$(addprefix $(intermediates.COMMON)/src/, $(logtags_sources)))
logtags_java_sources := $(patsubst %.logtags,%.java,$(addprefix $(intermediates.COMMON)/logtags/, $(logtags_sources)))
logtags_sources := $(addprefix $(LOCAL_PATH)/, $(logtags_sources))
$(logtags_java_sources): PRIVATE_MERGED_TAG := $(TARGET_OUT_COMMON_INTERMEDIATES)/all-event-log-tags.txt
$(logtags_java_sources): $(intermediates.COMMON)/src/%.java: $(LOCAL_PATH)/%.logtags $(TARGET_OUT_COMMON_INTERMEDIATES)/all-event-log-tags.txt $(JAVATAGS) build/tools/event_log_tags.py
$(logtags_java_sources): $(intermediates.COMMON)/logtags/%.java: $(LOCAL_PATH)/%.logtags $(TARGET_OUT_COMMON_INTERMEDIATES)/all-event-log-tags.txt $(JAVATAGS) build/tools/event_log_tags.py
$(transform-logtags-to-java)
else

View File

@ -393,7 +393,7 @@ $(R_file_stamp): $(all_res_assets) $(full_android_manifest) $(RenderScript_file_
@echo "target R.java/Manifest.java: $(PRIVATE_MODULE) ($@)"
@rm -rf $@ && mkdir -p $(dir $@)
$(create-resource-java-files)
$(call find-generated-R.java)
$(call find-generated-R.java,$@)
$(proguard_options_file): $(R_file_stamp)