Merge "Set BUILDING_WITH_NINJA flag when parsing makefiles for ninja build"
This commit is contained in:
commit
7edec14c8d
13
core/main.mk
13
core/main.mk
|
@ -95,12 +95,19 @@ include $(BUILD_SYSTEM)/help.mk
|
|||
# and host information.
|
||||
include $(BUILD_SYSTEM)/config.mk
|
||||
|
||||
relaunch_with_ninja :=
|
||||
ifneq ($(USE_NINJA),false)
|
||||
ifndef BUILDING_WITH_NINJA
|
||||
relaunch_with_ninja := true
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(relaunch_with_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)
|
||||
else # !relaunch_with_ninja
|
||||
ifndef BUILDING_WITH_NINJA
|
||||
# Remove ninja build mark if it exists.
|
||||
$(shell rm -f $(OUT_DIR)/ninja_build)
|
||||
endif
|
||||
|
@ -1066,4 +1073,4 @@ showcommands:
|
|||
.PHONY: nothing
|
||||
nothing:
|
||||
@echo Successfully read the makefiles.
|
||||
endif # !USE_NINJA
|
||||
endif # !relaunch_with_ninja
|
||||
|
|
|
@ -136,7 +136,7 @@ $(KATI_OUTPUTS): kati.intermediate $(KATI_FORCE)
|
|||
.INTERMEDIATE: kati.intermediate
|
||||
kati.intermediate: $(KATI) $(MAKEPARALLEL)
|
||||
@echo Running kati to generate build$(KATI_NINJA_SUFFIX).ninja...
|
||||
+$(hide) $(KATI_MAKEPARALLEL) $(KATI) --ninja --ninja_dir=$(PRODUCT_OUT) --ninja_suffix=$(KATI_NINJA_SUFFIX) --regen --ignore_dirty=$(OUT_DIR)/% --ignore_optional_include=$(OUT_DIR)/%.P --detect_android_echo --use_find_emulator -f build/core/main.mk $(or $(KATI_TARGETS),--gen_all_phony_targets) USE_NINJA=false
|
||||
+$(hide) $(KATI_MAKEPARALLEL) $(KATI) --ninja --ninja_dir=$(PRODUCT_OUT) --ninja_suffix=$(KATI_NINJA_SUFFIX) --regen --ignore_dirty=$(OUT_DIR)/% --ignore_optional_include=$(OUT_DIR)/%.P --detect_android_echo --use_find_emulator -f build/core/main.mk $(or $(KATI_TARGETS),--gen_all_phony_targets) BUILDING_WITH_NINJA=true
|
||||
|
||||
KATI_CXX := $(CLANG_CXX) $(CLANG_HOST_GLOBAL_CFLAGS) $(CLANG_HOST_GLOBAL_CPPFLAGS)
|
||||
KATI_LD := $(CLANG_CXX) $(CLANG_HOST_GLOBAL_LDFLAGS)
|
||||
|
|
Loading…
Reference in New Issue