From e96bfdb3376141be04f7188f9305b627a8b7a469 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 3 Nov 2017 15:49:25 -0700 Subject: [PATCH] Move BUILD_*_FROM_FILE to config.mk BUILD_NUMBER_FROM_FILE and BUILD_DATETIME_FROM_FILE may need to be referenced before main.mk has been parsed, move them to config.mk. Bug: 68865363 Test: m -j TARGET_PRODUCT=full TARGET_BUILD_APPS=Gallery aapt dump xmltree out/target/product/generic/obj/APPS/Gallery_intermediates/package.apk AndroidManifest.xml | grep Version Change-Id: I9361a394469e61fcdf5a2b9509ef2bb2b373d6e7 --- core/config.mk | 3 +++ core/main.mk | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/config.mk b/core/config.mk index dca72899a..f7d5ab807 100644 --- a/core/config.mk +++ b/core/config.mk @@ -741,6 +741,9 @@ else FRAMEWORK_COMPATIBILITY_MATRIX_FILE := hardware/interfaces/compatibility_matrix.current.xml endif +BUILD_NUMBER_FROM_FILE := $$(cat $(OUT_DIR)/build_number.txt) +BUILD_DATETIME_FROM_FILE := $$(cat $(OUT_DIR)/build_date.txt) + # ############################################################### # Set up final options. # ############################################################### diff --git a/core/main.mk b/core/main.mk index 2ebe8cbad..e7ecd5e29 100644 --- a/core/main.mk +++ b/core/main.mk @@ -62,8 +62,6 @@ include $(BUILD_SYSTEM)/clang/config.mk $(shell mkdir -p $(OUT_DIR) && \ echo -n $(BUILD_NUMBER) > $(OUT_DIR)/build_number.txt && \ echo -n $(BUILD_DATETIME) > $(OUT_DIR)/build_date.txt) -BUILD_NUMBER_FROM_FILE := $$(cat $(OUT_DIR)/build_number.txt) -BUILD_DATETIME_FROM_FILE := $$(cat $(OUT_DIR)/build_date.txt) ifeq ($(HOST_OS),darwin) DATE_FROM_FILE := date -r $(BUILD_DATETIME_FROM_FILE) else