aboutsummaryrefslogtreecommitdiffstats
path: root/core/ninja.mk
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2015-11-09 14:21:12 -0800
committerColin Cross <ccross@android.com>2015-11-17 12:10:13 -0800
commitea20915b3076e3997a9b2b6dd3c4cf45731106ff (patch)
tree4b6adb6a2aa72cd8dc00b52d5a8c931dcd033700 /core/ninja.mk
parentd6f389299c0854ea9bfd41ff30bfe0ee3615fd52 (diff)
downloadplatform_build-ea20915b3076e3997a9b2b6dd3c4cf45731106ff.tar.gz
platform_build-ea20915b3076e3997a9b2b6dd3c4cf45731106ff.tar.bz2
platform_build-ea20915b3076e3997a9b2b6dd3c4cf45731106ff.zip
Switch to using kati env script
Kati generates a shell script to run ninja, but that makes it difficult to customize the ninja command line. Switch to sourcing the new env script and then starting ninja manually. Change-Id: I7139290a463018ddf5e05b4d61a0d2f18b1a2247
Diffstat (limited to 'core/ninja.mk')
-rw-r--r--core/ninja.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/ninja.mk b/core/ninja.mk
index 2e8f3c8ec6..862ed804c8 100644
--- a/core/ninja.mk
+++ b/core/ninja.mk
@@ -1,5 +1,6 @@
KATI ?= $(HOST_OUT_EXECUTABLES)/ckati
MAKEPARALLEL ?= $(HOST_OUT_EXECUTABLES)/makeparallel
+NINJA ?= prebuilts/ninja/$(HOST_PREBUILT_TAG)/ninja
KATI_OUTPUT_PATTERNS := $(OUT_DIR)/build%.ninja $(OUT_DIR)/ninja%.sh
@@ -89,7 +90,7 @@ KATI_NINJA_SUFFIX := -$(word 1, $(shell echo $(my_checksum_suffix) | $(MD5SUM)))
endif
KATI_BUILD_NINJA := $(OUT_DIR)/build$(KATI_NINJA_SUFFIX).ninja
-KATI_NINJA_SH := $(OUT_DIR)/ninja$(KATI_NINJA_SUFFIX).sh
+KATI_ENV_SH := $(OUT_DIR)/env$(KATI_NINJA_SUFFIX).sh
# Write out a file mapping checksum to the real suffix.
ifneq ($(my_checksum_suffix),)
@@ -123,7 +124,7 @@ $(sort $(DEFAULT_GOAL) $(ANDROID_GOALS)) : ninja_wrapper
.PHONY: ninja_wrapper
ninja_wrapper: $(KATI_BUILD_NINJA) $(MAKEPARALLEL)
@echo Starting build with ninja
- +$(hide) PATH=prebuilts/ninja/$(HOST_PREBUILT_TAG)/:$$PATH NINJA_STATUS="$(NINJA_STATUS)" $(NINJA_MAKEPARALLEL) $(KATI_NINJA_SH) $(NINJA_GOALS) -C $(TOP) $(NINJA_ARGS)
+ +$(hide) export NINJA_STATUS="$(NINJA_STATUS)" && source $(KATI_ENV_SH) && $(NINJA_MAKEPARALLEL) $(NINJA) $(NINJA_GOALS) -C $(TOP) -f $(KATI_BUILD_NINJA) $(NINJA_ARGS)
KATI_FIND_EMULATOR := --use_find_emulator
ifeq ($(KATI_EMULATE_FIND),false)