diff options
author | Dan Willemsen <dwillemsen@google.com> | 2020-05-27 00:09:16 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2020-05-27 19:37:03 -0700 |
commit | 9767223dc547f894ce6fd52da0b9186e225057f0 (patch) | |
tree | a48cd0c29123d623232dab6aa2fe68ce029f76e5 | |
parent | a29edba6e86cde74fa48851f8faa943c1cff2b3b (diff) | |
download | build-9767223dc547f894ce6fd52da0b9186e225057f0.tar.gz |
Fix up recovery_text_res
First, make it safer for incremental builds. We used to just be
depending on the bootable/recovery/tools/recovery_l10n/res dir as a
dependency, but that would only trigger a rebuild if a direct child
file/directory was added or removed (so essentially, when a translation
was addded or removed). If a translation was updated, it wouldn't
re-trigger recovery_text_res.
So instead of depending on the directory, depend on the results from
running `find` to list all of the contents in that directory.
Next, move it out of PACKAGING. `m installclean`, which runs in between
incremental builds on our build servers, deletes the obj/PACKAGING
directory. So when recovery_text_res used that directory, we were having
to rebuild it on every incremental build, which isn't optimal when it
takes nearly 90s to build.
So with:
$ lunch aosp_coral-eng
$ m bootimage
$ m installclean
$ m bootimage
The second `m bootimage` went from executing 666 actions in 93s to
executing 658 actions in 6s.
Finally, remove the last uses of $(call include-path-for,recovery),
since they were all in this file (and they weren't using it for include
paths...). We'd like to remove all of these and switch them to header
libraries or other use cases, but in this case, it's just shorter to use
the real path.
Test: treehugger
Test: m bootimage;
touch bootable/recovery/tools/recovery_l10n/res/values/strings.xml
m bootimage
Test: m bootimage; m installclean; m bootimage
Change-Id: I005592e49443aab45ed039a2f0c63f7a69035565
-rw-r--r-- | core/Makefile | 15 | ||||
-rw-r--r-- | core/pathmap.mk | 1 |
2 files changed, 8 insertions, 8 deletions
diff --git a/core/Makefile b/core/Makefile index 6ae7992bdd..7a3757cc05 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1412,7 +1412,7 @@ IGNORE_RECOVERY_SEPOLICY := $(patsubst $(TARGET_RECOVERY_OUT)/%,--exclude=/%,$(r recovery_kernel := $(INSTALLED_KERNEL_TARGET) # same as a non-recovery system recovery_ramdisk := $(PRODUCT_OUT)/ramdisk-recovery.img -recovery_resources_common := $(call include-path-for, recovery)/res +recovery_resources_common := bootable/recovery/res # Set recovery_density to a density bucket based on TARGET_SCREEN_DENSITY, PRODUCT_AAPT_PREF_CONFIG, # or mdpi, in order of preference. We support both specific buckets (e.g. xdpi) and numbers, @@ -1440,9 +1440,9 @@ endif # Note that the font selected here can be overridden for a particular device by putting a font.png # in its private recovery resources. ifneq (,$(filter xxxhdpi xxhdpi xhdpi,$(recovery_density))) -recovery_font := $(call include-path-for, recovery)/fonts/18x32.png +recovery_font := bootable/recovery/fonts/18x32.png else -recovery_font := $(call include-path-for, recovery)/fonts/12x22.png +recovery_font := bootable/recovery/fonts/12x22.png endif @@ -1466,7 +1466,7 @@ else endif -RECOVERY_INSTALLING_TEXT_FILE := $(call intermediates-dir-for,PACKAGING,recovery_text_res)/installing_text.png +RECOVERY_INSTALLING_TEXT_FILE := $(call intermediates-dir-for,ETC,recovery_text_res)/installing_text.png RECOVERY_INSTALLING_SECURITY_TEXT_FILE := $(dir $(RECOVERY_INSTALLING_TEXT_FILE))/installing_security_text.png RECOVERY_ERASING_TEXT_FILE := $(dir $(RECOVERY_INSTALLING_TEXT_FILE))/erasing_text.png RECOVERY_ERROR_TEXT_FILE := $(dir $(RECOVERY_INSTALLING_TEXT_FILE))/error_text.png @@ -1490,11 +1490,12 @@ generated_recovery_text_files := \ $(RECOVERY_WIPE_DATA_CONFIRMATION_TEXT_FILE) \ $(RECOVERY_WIPE_DATA_MENU_HEADER_TEXT_FILE) -resource_dir := $(call include-path-for, recovery)/tools/recovery_l10n/res/ +resource_dir := bootable/recovery/tools/recovery_l10n/res/ +resource_dir_deps := $(sort $(shell find $(resource_dir) -name *.xml -not -name .*)) image_generator_jar := $(HOST_OUT_JAVA_LIBRARIES)/RecoveryImageGenerator.jar zopflipng := $(HOST_OUT_EXECUTABLES)/zopflipng $(RECOVERY_INSTALLING_TEXT_FILE): PRIVATE_SOURCE_FONTS := $(recovery_noto-fonts_dep) $(recovery_roboto-fonts_dep) -$(RECOVERY_INSTALLING_TEXT_FILE): PRIVATE_RECOVERY_FONT_FILES_DIR := $(call intermediates-dir-for,PACKAGING,recovery_font_files) +$(RECOVERY_INSTALLING_TEXT_FILE): PRIVATE_RECOVERY_FONT_FILES_DIR := $(call intermediates-dir-for,ETC,recovery_font_files) $(RECOVERY_INSTALLING_TEXT_FILE): PRIVATE_RESOURCE_DIR := $(resource_dir) $(RECOVERY_INSTALLING_TEXT_FILE): PRIVATE_IMAGE_GENERATOR_JAR := $(image_generator_jar) $(RECOVERY_INSTALLING_TEXT_FILE): PRIVATE_ZOPFLIPNG := $(zopflipng) @@ -1512,7 +1513,7 @@ $(RECOVERY_INSTALLING_TEXT_FILE): PRIVATE_RECOVERY_WIPE_DATA_TEXT_LIST := \ recovery_wipe_data_menu_header \ recovery_wipe_data_confirmation $(RECOVERY_INSTALLING_TEXT_FILE): .KATI_IMPLICIT_OUTPUTS := $(filter-out $(RECOVERY_INSTALLING_TEXT_FILE),$(generated_recovery_text_files)) -$(RECOVERY_INSTALLING_TEXT_FILE): $(image_generator_jar) $(resource_dir) $(recovery_noto-fonts_dep) $(recovery_roboto-fonts_dep) $(zopflipng) +$(RECOVERY_INSTALLING_TEXT_FILE): $(image_generator_jar) $(resource_dir_deps) $(recovery_noto-fonts_dep) $(recovery_roboto-fonts_dep) $(zopflipng) # Prepares the font directory. @rm -rf $(PRIVATE_RECOVERY_FONT_FILES_DIR) @mkdir -p $(PRIVATE_RECOVERY_FONT_FILES_DIR) diff --git a/core/pathmap.mk b/core/pathmap.mk index af33f5de35..dacbe2195d 100644 --- a/core/pathmap.mk +++ b/core/pathmap.mk @@ -40,7 +40,6 @@ pathmap_INCL := \ libhardware:hardware/libhardware/include \ libhardware_legacy:hardware/libhardware_legacy/include \ libril:hardware/ril/include \ - recovery:bootable/recovery \ system-core:system/core/include \ audio:system/media/audio/include \ audio-effects:system/media/audio_effects/include \ |