am 9ed5072a: am ac6e6b34: am 0c0b2e65: Merge "Use unmodified MAKECMDGOALS in ninja.mk."

* commit '9ed5072a004c89bddfe0a370c4022ae7a30c3469':
  Use unmodified MAKECMDGOALS in ninja.mk.
This commit is contained in:
Ying Wang 2015-07-30 00:30:11 +00:00 committed by Android Git Automerger
commit 4253434fed
4 changed files with 9 additions and 9 deletions

View File

@ -110,7 +110,7 @@ BUILD_HOST_DALVIK_STATIC_JAVA_LIBRARY := $(BUILD_SYSTEM)/host_dalvik_static_java
# lines being executed, instead of a short message about # lines being executed, instead of a short message about
# the kind of operation being done. # the kind of operation being done.
SHOW_COMMANDS:= $(filter showcommands,$(MAKECMDGOALS)) SHOW_COMMANDS:= $(filter showcommands,$(MAKECMDGOALS))
hide := $(if $(SHOW_COMMANDS),,@)
# ############################################################### # ###############################################################
# Set common values # Set common values

View File

@ -802,11 +802,9 @@ ifeq ($(strip $(SHOW_COMMANDS)),)
define pretty define pretty
@echo $1 @echo $1
endef endef
hide := @
else else
define pretty define pretty
endef endef
hide :=
endif endif
########################################################### ###########################################################

View File

@ -86,6 +86,8 @@ ifneq ($(filter $(dont_bother_goals), $(MAKECMDGOALS)),)
dont_bother := true dont_bother := true
endif endif
ORIGINAL_MAKECMDGOALS := $(MAKECMDGOALS)
# Targets that provide quick help on the build system. # Targets that provide quick help on the build system.
include $(BUILD_SYSTEM)/help.mk include $(BUILD_SYSTEM)/help.mk

View File

@ -3,32 +3,32 @@ KATI ?= $(HOST_OUT_EXECUTABLES)/ckati
KATI_OUTPUTS := $(PRODUCT_OUT)/build.ninja $(PRODUCT_OUT)/ninja.sh KATI_OUTPUTS := $(PRODUCT_OUT)/build.ninja $(PRODUCT_OUT)/ninja.sh
NINJA_GOALS := fastincremental generateonly droid showcommands NINJA_GOALS := fastincremental generateonly droid showcommands
ANDROID_TARGETS := $(filter-out $(KATI_OUTPUTS) $(NINJA_GOALS),$(MAKECMDGOALS)) ANDROID_TARGETS := $(filter-out $(KATI_OUTPUTS) $(NINJA_GOALS),$(ORIGINAL_MAKECMDGOALS))
ifeq (,$(NINJA_STATUS)) ifeq (,$(NINJA_STATUS))
NINJA_STATUS := [%p %s/%t]$(space) NINJA_STATUS := [%p %s/%t]$(space)
endif endif
ifneq (,$(filter showcommands,$(MAKECMDGOALS))) ifneq (,$(filter showcommands,$(ORIGINAL_MAKECMDGOALS)))
NINJA_ARGS += "-v" NINJA_ARGS += "-v"
PHONY: showcommands PHONY: showcommands
showcommands: droid showcommands: droid
endif endif
ifeq (,$(filter generateonly,$(MAKECMDGOALS))) ifeq (,$(filter generateonly,$(ORIGINAL_MAKECMDGOALS)))
fastincremental droid $(ANDROID_TARGETS): ninja.intermediate fastincremental droid $(ANDROID_TARGETS): ninja.intermediate
@#empty @#empty
.INTERMEDIATE: ninja.intermediate .INTERMEDIATE: ninja.intermediate
ninja.intermediate: $(KATI_OUTPUTS) ninja.intermediate: $(KATI_OUTPUTS)
@echo Starting build with ninja @echo Starting build with ninja
@PATH=prebuilts/ninja/$(HOST_PREBUILT_TAG)/:$$PATH NINJA_STATUS="$(NINJA_STATUS)" $(PRODUCT_OUT)/ninja.sh -C $(TOP) $(NINJA_ARGS) $(ANDROID_TARGETS) $(hide) PATH=prebuilts/ninja/$(HOST_PREBUILT_TAG)/:$$PATH NINJA_STATUS="$(NINJA_STATUS)" $(PRODUCT_OUT)/ninja.sh -C $(TOP) $(NINJA_ARGS) $(ANDROID_TARGETS)
else else
generateonly droid $(ANDROID_TARGETS): $(KATI_OUTPUTS) generateonly droid $(ANDROID_TARGETS): $(KATI_OUTPUTS)
@#empty @#empty
endif endif
ifeq (,$(filter fastincremental,$(MAKECMDGOALS))) ifeq (,$(filter fastincremental,$(ORIGINAL_MAKECMDGOALS)))
KATI_FORCE := FORCE KATI_FORCE := FORCE
endif endif
@ -38,7 +38,7 @@ $(KATI_OUTPUTS): kati.intermediate $(KATI_FORCE)
kati.intermediate: $(KATI) kati.intermediate: $(KATI)
@echo Running kati to generate build.ninja... @echo Running kati to generate build.ninja...
@#TODO: use separate ninja file for mm or single target build @#TODO: use separate ninja file for mm or single target build
@$(KATI) --ninja --ninja_dir=$(PRODUCT_OUT) --ignore_optional_include=out/%.P --detect_android_echo --use_find_emulator -f build/core/main.mk $(ANDROID_TARGETS) USE_NINJA=false $(hide) $(KATI) --ninja --ninja_dir=$(PRODUCT_OUT) --ignore_optional_include=$(OUT_DIR)/%.P --detect_android_echo --use_find_emulator -f build/core/main.mk $(ANDROID_TARGETS) USE_NINJA=false
KATI_CXX := $(CLANG_CXX) $(CLANG_HOST_GLOBAL_CPPFLAGS) KATI_CXX := $(CLANG_CXX) $(CLANG_HOST_GLOBAL_CPPFLAGS)
KATI_LD := $(CLANG_CXX) $(CLANG_HOST_GLOBAL_LDFLAGS) KATI_LD := $(CLANG_CXX) $(CLANG_HOST_GLOBAL_LDFLAGS)