From 06332732a48d1b229cc5886cc45f27bb2ccbe8d7 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Tue, 21 Jul 2015 16:22:51 -0700 Subject: [PATCH] Create OUT_DIR before writing build_number.txt. Change-Id: I6a84ec59194c48f4291480cb0c94db0da488518c --- core/Makefile | 2 +- core/main.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/Makefile b/core/Makefile index c35f7449c2..410fa163e8 100644 --- a/core/Makefile +++ b/core/Makefile @@ -124,7 +124,7 @@ ifneq ($(words $(BUILD_FINGERPRINT)),1) $(error BUILD_FINGERPRINT cannot contain spaces: "$(BUILD_FINGERPRINT)") endif -$(shell echo $(BUILD_FINGERPRINT) > $(PRODUCT_OUT)/build_fingerprint.txt) +$(shell mkdir -p $(PRODUCT_OUT) && echo $(BUILD_FINGERPRINT) > $(PRODUCT_OUT)/build_fingerprint.txt) BUILD_FINGERPRINT_FROM_FILE := $$(cat $(PRODUCT_OUT)/build_fingerprint.txt) # The string used to uniquely identify the system build; used by the OTA server. diff --git a/core/main.mk b/core/main.mk index 7f22d76aa8..f9b9d956c4 100644 --- a/core/main.mk +++ b/core/main.mk @@ -96,7 +96,7 @@ include $(BUILD_SYSTEM)/config.mk # Write the build number to a file so it can be read back in # without changing the command line every time. Avoids rebuilds # when using ninja. -$(shell echo -n $(BUILD_NUMBER) > $(OUT_DIR)/build_number.txt) +$(shell mkdir -p $(OUT_DIR) && echo -n $(BUILD_NUMBER) > $(OUT_DIR)/build_number.txt) BUILD_NUMBER_FROM_FILE := $$(cat $(OUT_DIR)/build_number.txt) # CTS-specific config.