BUILD_NUMBER and BUILD_HOSTNAME doesn't affect kati regeneration

* Extract BUILD_NUMBER, BUILD_HOSTNAME to file to avoid kati change
* Handle FILE_NAME_TAG_PLACEHOLDER string in dist in build/make/packaging/distdir.mk

Ignore-AOSP-First: there are internal use cases of FILE_NAME_TAG
Test: check if kati isn't invoked even though BUILD_NUMBER, BUILD_HOSTNAME
  is changed
Test: m && m, and check if the second m is no-op
Bug: 278060169
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7b40aa8338ba85a58ee481fe6bafac2959f7112b)
Merged-In: I1b37760242853c1a145bad255d0bb15524234b25
Change-Id: I1b37760242853c1a145bad255d0bb15524234b25
This commit is contained in:
Jeongik Cha
2023-04-27 11:05:22 +09:00
committed by Cherrypicker Worker
parent 03bd5812e8
commit d0b037235d
13 changed files with 91 additions and 76 deletions

View File

@@ -19,12 +19,13 @@
addon_name := $(PRODUCT_SDK_ADDON_NAME)
ifneq ($(addon_name),)
addon_dir_leaf := $(addon_name)-$(FILE_NAME_TAG)-$(INTERNAL_SDK_HOST_OS_NAME)
addon_dir_img := $(addon_dir_leaf)-img
intermediates := $(HOST_OUT_INTERMEDIATES)/SDK_ADDON/$(addon_name)_intermediates
full_target := $(HOST_OUT_SDK_ADDON)/$(addon_dir_leaf).zip
full_target_img := $(HOST_OUT_SDK_ADDON)/$(addon_dir_img).zip
staging := $(intermediates)
addon_dir_leaf := $(addon_name)-$(INTERNAL_SDK_HOST_OS_NAME)
addon_dir_img := $(addon_dir_leaf)-img
intermediates := $(HOST_OUT_INTERMEDIATES)/SDK_ADDON/$(addon_name)_intermediates
full_target := $(HOST_OUT_SDK_ADDON)/$(addon_dir_leaf).zip
full_target_dist_name := $(addon_name)-FILE_NAME_TAG_PLACEHOLDER-$(INTERNAL_SDK_HOST_OS_NAME)
full_target_img := $(HOST_OUT_SDK_ADDON)/$(addon_dir_img).zip
staging := $(intermediates)
sdk_addon_deps :=
files_to_copy :=
@@ -140,7 +141,7 @@ ADDON_SDK_IMG_ZIP := $(full_target_img)
else
# When not building an sdk_repo, just dist the addon zip file
# as-is.
$(call dist-for-goals, sdk_addon, $(full_target))
$(call dist-for-goals, sdk_addon, $(full_target):$(full_target_dist_name))
endif
else # addon_name