From eb1e18e68904287058644867cb4304a9e7c58a2d Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Wed, 16 Sep 2015 15:29:08 -0700 Subject: [PATCH] Use $(OUT_DIR)/ninja_build to mark ninja build. Bug: 23565895 Change-Id: I000e88a45278fd52096312262eacc52511f02efb --- core/main.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/main.mk b/core/main.mk index e10f656a8..6baf6c46a 100644 --- a/core/main.mk +++ b/core/main.mk @@ -93,8 +93,14 @@ include $(BUILD_SYSTEM)/help.mk include $(BUILD_SYSTEM)/config.mk ifeq ($(USE_NINJA),true) +# Mark this is a ninja build. +$(shell mkdir -p $(OUT_DIR) && touch $(OUT_DIR)/ninja_build) include build/core/ninja.mk else # !USE_NINJA +ifeq ($(MAKELEVEL),0) +# Remove ninja build mark if it exists. +$(shell rm -f $(OUT_DIR)/ninja_build) +endif # Write the build number to a file so it can be read back in # without changing the command line every time. Avoids rebuilds