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

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

View file

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

View file

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

View file

@ -86,6 +86,8 @@ ifneq ($(filter $(dont_bother_goals), $(MAKECMDGOALS)),)
dont_bother := true
endif
ORIGINAL_MAKECMDGOALS := $(MAKECMDGOALS)
# Targets that provide quick help on the build system.
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
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))
NINJA_STATUS := [%p %s/%t]$(space)
endif
ifneq (,$(filter showcommands,$(MAKECMDGOALS)))
ifneq (,$(filter showcommands,$(ORIGINAL_MAKECMDGOALS)))
NINJA_ARGS += "-v"
PHONY: showcommands
showcommands: droid
endif
ifeq (,$(filter generateonly,$(MAKECMDGOALS)))
ifeq (,$(filter generateonly,$(ORIGINAL_MAKECMDGOALS)))
fastincremental droid $(ANDROID_TARGETS): ninja.intermediate
@#empty
.INTERMEDIATE: ninja.intermediate
ninja.intermediate: $(KATI_OUTPUTS)
@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
generateonly droid $(ANDROID_TARGETS): $(KATI_OUTPUTS)
@#empty
endif
ifeq (,$(filter fastincremental,$(MAKECMDGOALS)))
ifeq (,$(filter fastincremental,$(ORIGINAL_MAKECMDGOALS)))
KATI_FORCE := FORCE
endif
@ -38,7 +38,7 @@ $(KATI_OUTPUTS): kati.intermediate $(KATI_FORCE)
kati.intermediate: $(KATI)
@echo Running kati to generate build.ninja...
@#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_LD := $(CLANG_CXX) $(CLANG_HOST_GLOBAL_LDFLAGS)