Merge changes I73787aff,I0d149812 am: 64caaf4679 am: 060e215f84

am: 6106d440c1

Change-Id: I509ee75ca9ee6c8dcacb839103d499bfe790dd23
This commit is contained in:
Dan Willemsen 2017-05-26 22:16:34 +00:00 committed by android-build-merger
commit 118ceaea9a
5 changed files with 20 additions and 48 deletions

View file

@ -129,11 +129,7 @@ BUILD_HOST_DALVIK_STATIC_JAVA_LIBRARY := $(BUILD_SYSTEM)/host_dalvik_static_java
# Parse out any modifier targets.
# ###############################################################
# The 'showcommands' goal says to show the full command
# lines being executed, instead of a short message about
# the kind of operation being done.
SHOW_COMMANDS:= $(filter showcommands,$(MAKECMDGOALS))
hide := $(if $(SHOW_COMMANDS),,@)
hide := @
################################################################
# Tools needed in product configuration makefiles.

View file

@ -17,16 +17,8 @@
# When specifying "dist", the user has asked that we copy the important
# files from this build into DIST_DIR.
.PHONY: dist
dist: ;
dist_goal := $(strip $(filter dist,$(MAKECMDGOALS)))
MAKECMDGOALS := $(strip $(filter-out dist,$(MAKECMDGOALS)))
ifeq (,$(strip $(filter-out $(INTERNAL_MODIFIER_TARGETS),$(MAKECMDGOALS))))
# The commandline was something like "make dist" or "make dist showcommands".
# Add a dependency on a real target.
dist: $(DEFAULT_GOAL)
endif
ifdef dist_goal

View file

@ -91,7 +91,7 @@ include $(BUILD_SYSTEM)/cleanbuild.mk
# These are the modifier targets that don't do anything themselves, but
# change the behavior of the build.
# (must be defined before including definitions.make)
INTERNAL_MODIFIER_TARGETS := showcommands all
INTERNAL_MODIFIER_TARGETS := all
# EMMA_INSTRUMENT_STATIC merges the static emma library to each emma-enabled module.
ifeq (true,$(EMMA_INSTRUMENT_STATIC))
@ -334,7 +334,7 @@ endef
endif
# If they only used the modifier goals (showcommands, etc), we'll actually
# If they only used the modifier goals (all, etc), we'll actually
# build the default target.
ifeq ($(filter-out $(INTERNAL_MODIFIER_TARGETS),$(MAKECMDGOALS)),)
.PHONY: $(INTERNAL_MODIFIER_TARGETS)
@ -1135,10 +1135,6 @@ modules:
@echo "$(call module-names-for-tag-list,$(ALL_MODULE_TAGS))" | \
tr -s ' ' '\n' | sort -u | $(COLUMN)
.PHONY: showcommands
showcommands:
@echo >/dev/null
.PHONY: nothing
nothing:
@echo Successfully read the makefiles.

View file

@ -7,18 +7,14 @@ endif
KATI_OUTPUT_PATTERNS := $(OUT_DIR)/build%.ninja $(OUT_DIR)/ninja%.sh
# Modifier goals we don't need to pass to Ninja.
NINJA_EXCLUDE_GOALS := showcommands all dist
.PHONY : $(NINJA_EXCLUDE_GOALS)
NINJA_EXCLUDE_GOALS := all dist APP-% PRODUCT-%
# A list of goals which affect parsing of makefiles and we need to pass to Kati.
PARSE_TIME_MAKE_GOALS := \
$(PARSE_TIME_MAKE_GOALS) \
$(dont_bother_goals) \
all \
APP-% \
DUMP_% \
ECLIPSE-% \
PRODUCT-% \
AUX-% \
boottarball-nodeps \
brillo_tests \
@ -67,5 +63,8 @@ ANDROID_GOALS := $(filter-out $(KATI_OUTPUT_PATTERNS) $(CKATI) $(MAKEPARALLEL),\
$(sort $(ORIGINAL_MAKECMDGOALS) $(MAKECMDGOALS)))
# Goals we need to pass to Ninja.
NINJA_GOALS := $(filter-out $(NINJA_EXCLUDE_GOALS), $(ANDROID_GOALS))
ifndef NINJA_GOALS
NINJA_GOALS := droid
endif
# Goals we need to pass to Kati.
KATI_GOALS := $(filter $(PARSE_TIME_MAKE_GOALS), $(ANDROID_GOALS))
KATI_GOALS := $(filter $(PARSE_TIME_MAKE_GOALS), $(ANDROID_GOALS))

View file

@ -88,6 +88,7 @@ INTERNAL_VALID_VARIANTS := user userdebug eng
# Provide "PRODUCT-<prodname>-<goal>" targets, which lets you build
# a particular configuration without needing to set up the environment.
#
ifndef KATI
product_goals := $(strip $(filter PRODUCT-%,$(MAKECMDGOALS)))
ifdef product_goals
# Scrape the product and build names out of the goal,
@ -113,54 +114,42 @@ ifdef product_goals
$(error "tests" has been deprecated as a build variant. Use it as a build goal instead.)
endif
# The build server wants to do make PRODUCT-dream-installclean
# which really means TARGET_PRODUCT=dream make installclean.
# The build server wants to do make PRODUCT-dream-sdk
# which really means TARGET_PRODUCT=dream make sdk.
ifneq ($(filter-out $(INTERNAL_VALID_VARIANTS),$(TARGET_BUILD_VARIANT)),)
MAKECMDGOALS := $(MAKECMDGOALS) $(TARGET_BUILD_VARIANT)
override MAKECMDGOALS := $(MAKECMDGOALS) $(TARGET_BUILD_VARIANT)
TARGET_BUILD_VARIANT := userdebug
default_goal_substitution :=
else
default_goal_substitution := $(DEFAULT_GOAL)
default_goal_substitution := droid
endif
# Replace the PRODUCT-* goal with the build goal that it refers to.
# Note that this will ensure that it appears in the same relative
# position, in case it matters.
#
# Note that modifying this will not affect the goals that make will
# attempt to build, but it's important because we inspect this value
# in certain situations (like for "make sdk").
#
MAKECMDGOALS := $(patsubst $(goal_name),$(default_goal_substitution),$(MAKECMDGOALS))
# Define a rule for the PRODUCT-* goal, and make it depend on the
# patched-up command-line goals as well as any other goals that we
# want to force.
#
.PHONY: $(goal_name)
$(goal_name): $(MAKECMDGOALS)
override MAKECMDGOALS := $(patsubst $(goal_name),$(default_goal_substitution),$(MAKECMDGOALS))
endif
endif # !KATI
# else: Use the value set in the environment or buildspec.mk.
# ---------------------------------------------------------------
# Provide "APP-<appname>" targets, which lets you build
# an unbundled app.
#
ifndef KATI
unbundled_goals := $(strip $(filter APP-%,$(MAKECMDGOALS)))
ifdef unbundled_goals
ifneq ($(words $(unbundled_goals)),1)
$(error Only one APP-* goal may be specified; saw "$(unbundled_goals)")
endif
TARGET_BUILD_APPS := $(strip $(subst -, ,$(patsubst APP-%,%,$(unbundled_goals))))
ifneq ($(filter $(DEFAULT_GOAL),$(MAKECMDGOALS)),)
MAKECMDGOALS := $(patsubst $(unbundled_goals),,$(MAKECMDGOALS))
ifneq ($(filter droid,$(MAKECMDGOALS)),)
override MAKECMDGOALS := $(patsubst $(unbundled_goals),,$(MAKECMDGOALS))
else
MAKECMDGOALS := $(patsubst $(unbundled_goals),$(DEFAULT_GOAL),$(MAKECMDGOALS))
override MAKECMDGOALS := $(patsubst $(unbundled_goals),droid,$(MAKECMDGOALS))
endif
.PHONY: $(unbundled_goals)
$(unbundled_goals): $(MAKECMDGOALS)
endif # unbundled_goals
endif
# Default to building dalvikvm on hosts that support it...
ifeq ($(HOST_OS),linux)