Build with kati+ninja when USE_NINJA=true
If USE_NINJA=true, use kati to translate makefiles into ninja files,
and then execute them with ninja.
Builds kati from source using simplified versions of the rules
in binary.mk and definitions.mk.
Adds two new goals when USE_NINJA=true: generateonly will regenerate
build.ninja but not rebuild (useful for comparing build.ninja output
between runs), and fastincremental will skip regenerating build.ninja
and go directly to running ninja, providing ~5 second incremental
builds.
Change-Id: Ib85399e730f1fbb1be7371fafeee7d1c31080771
diff --git a/core/main.mk b/core/main.mk
index ffff1f7..1931ea9 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -93,6 +93,10 @@
# and host information.
include $(BUILD_SYSTEM)/config.mk
+ifeq ($(USE_NINJA),true)
+include build/core/ninja.mk
+else # !USE_NINJA
+
# 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.
@@ -1065,3 +1069,4 @@
.PHONY: nothing
nothing:
@echo Successfully read the makefiles.
+endif # !USE_NINJA