diff --git a/core/Makefile b/core/Makefile index d7b3ab7d2..3968ac333 100644 --- a/core/Makefile +++ b/core/Makefile @@ -3254,6 +3254,27 @@ $(INTERNAL_UPDATE_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(ZIP2ZIP) .PHONY: updatepackage updatepackage: $(INTERNAL_UPDATE_PACKAGE_TARGET) +# ----------------------------------------------------------------- +# A zip of the appcompat directory containing logs +APPCOMPAT_ZIP := $(PRODUCT_OUT)/appcompat.zip +# For apps_only build we'll establish the dependency later in build/make/core/main.mk. +ifndef TARGET_BUILD_APPS +$(APPCOMPAT_ZIP): $(INSTALLED_SYSTEMIMAGE) \ + $(INSTALLED_BOOTIMAGE_TARGET) \ + $(INSTALLED_USERDATAIMAGE_TARGET) \ + $(INSTALLED_VENDORIMAGE_TARGET) \ + $(INSTALLED_PRODUCTIMAGE_TARGET) \ + $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET) +endif +$(APPCOMPAT_ZIP): PRIVATE_LIST_FILE := $(call intermediates-dir-for,PACKAGING,appcompat)/filelist +$(APPCOMPAT_ZIP): $(SOONG_ZIP) + @echo "appcompat logs: $@" + $(hide) rm -rf $@ $(PRIVATE_LIST_FILE) + $(hide) mkdir -p $(dir $@) $(PRODUCT_OUT)/appcompat $(dir $(PRIVATE_LIST_FILE)) + $(hide) find $(PRODUCT_OUT)/appcompat | sort >$(PRIVATE_LIST_FILE) + $(hide) $(SOONG_ZIP) -d -o $@ -C $(PRODUCT_OUT)/appcompat -l $(PRIVATE_LIST_FILE) + + # ----------------------------------------------------------------- # A zip of the symbols directory. Keep the full paths to make it # more obvious where these files came from. @@ -3510,6 +3531,7 @@ deps := \ $(OUT_DOCS)/offline-sdk-timestamp \ $(SYMBOLS_ZIP) \ $(COVERAGE_ZIP) \ + $(APPCOMPAT_ZIP) \ $(INSTALLED_SYSTEMIMAGE) \ $(INSTALLED_QEMU_SYSTEMIMAGE) \ $(INSTALLED_QEMU_VENDORIMAGE) \ diff --git a/core/main.mk b/core/main.mk index fb845dfb6..7292277ac 100644 --- a/core/main.mk +++ b/core/main.mk @@ -1258,6 +1258,9 @@ ifneq ($(TARGET_BUILD_APPS),) $(COVERAGE_ZIP) : $(apps_only_installed_files) $(call dist-for-goals,apps_only, $(COVERAGE_ZIP)) + $(APPCOMPAT_ZIP) : $(apps_only_installed_files) + $(call dist-for-goals,apps_only, $(APPCOMPAT_ZIP)) + .PHONY: apps_only apps_only: $(unbundled_build_modules) @@ -1279,6 +1282,7 @@ else # TARGET_BUILD_APPS $(BUILT_OTATOOLS_PACKAGE) \ $(SYMBOLS_ZIP) \ $(COVERAGE_ZIP) \ + $(APPCOMPAT_ZIP) \ $(INSTALLED_FILES_FILE) \ $(INSTALLED_FILES_JSON) \ $(INSTALLED_FILES_FILE_VENDOR) \ @@ -1346,6 +1350,7 @@ $(call dist-for-goals,sdk win_sdk, \ $(ALL_SDK_TARGETS) \ $(SYMBOLS_ZIP) \ $(COVERAGE_ZIP) \ + $(APPCOMPAT_ZIP) \ $(INSTALLED_BUILD_PROP_TARGET) \ )