Merge changes I73787aff,I0d149812

am: 64caaf4679

Change-Id: I6ab81dc88f6b642637ed6c87c2f551d5bdd4d661
This commit is contained in:
Dan Willemsen 2017-05-26 22:12:35 +00:00 committed by android-build-merger
commit 060e215f84
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. # Parse out any modifier targets.
# ############################################################### # ###############################################################
# The 'showcommands' goal says to show the full command hide := @
# lines being executed, instead of a short message about
# the kind of operation being done.
SHOW_COMMANDS:= $(filter showcommands,$(MAKECMDGOALS))
hide := $(if $(SHOW_COMMANDS),,@)
################################################################ ################################################################
# Tools needed in product configuration makefiles. # Tools needed in product configuration makefiles.

View File

@ -17,16 +17,8 @@
# When specifying "dist", the user has asked that we copy the important # When specifying "dist", the user has asked that we copy the important
# files from this build into DIST_DIR. # files from this build into DIST_DIR.
.PHONY: dist
dist: ;
dist_goal := $(strip $(filter dist,$(MAKECMDGOALS))) dist_goal := $(strip $(filter dist,$(MAKECMDGOALS)))
MAKECMDGOALS := $(strip $(filter-out 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 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 # These are the modifier targets that don't do anything themselves, but
# change the behavior of the build. # change the behavior of the build.
# (must be defined before including definitions.make) # (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. # EMMA_INSTRUMENT_STATIC merges the static emma library to each emma-enabled module.
ifeq (true,$(EMMA_INSTRUMENT_STATIC)) ifeq (true,$(EMMA_INSTRUMENT_STATIC))
@ -326,7 +326,7 @@ endef
endif 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. # build the default target.
ifeq ($(filter-out $(INTERNAL_MODIFIER_TARGETS),$(MAKECMDGOALS)),) ifeq ($(filter-out $(INTERNAL_MODIFIER_TARGETS),$(MAKECMDGOALS)),)
.PHONY: $(INTERNAL_MODIFIER_TARGETS) .PHONY: $(INTERNAL_MODIFIER_TARGETS)
@ -1127,10 +1127,6 @@ modules:
@echo "$(call module-names-for-tag-list,$(ALL_MODULE_TAGS))" | \ @echo "$(call module-names-for-tag-list,$(ALL_MODULE_TAGS))" | \
tr -s ' ' '\n' | sort -u | $(COLUMN) tr -s ' ' '\n' | sort -u | $(COLUMN)
.PHONY: showcommands
showcommands:
@echo >/dev/null
.PHONY: nothing .PHONY: nothing
nothing: nothing:
@echo Successfully read the makefiles. @echo Successfully read the makefiles.

View File

@ -7,18 +7,14 @@ endif
KATI_OUTPUT_PATTERNS := $(OUT_DIR)/build%.ninja $(OUT_DIR)/ninja%.sh KATI_OUTPUT_PATTERNS := $(OUT_DIR)/build%.ninja $(OUT_DIR)/ninja%.sh
# Modifier goals we don't need to pass to Ninja. # Modifier goals we don't need to pass to Ninja.
NINJA_EXCLUDE_GOALS := showcommands all dist NINJA_EXCLUDE_GOALS := all dist APP-% PRODUCT-%
.PHONY : $(NINJA_EXCLUDE_GOALS)
# A list of goals which affect parsing of makefiles and we need to pass to Kati. # A list of goals which affect parsing of makefiles and we need to pass to Kati.
PARSE_TIME_MAKE_GOALS := \ PARSE_TIME_MAKE_GOALS := \
$(PARSE_TIME_MAKE_GOALS) \ $(PARSE_TIME_MAKE_GOALS) \
$(dont_bother_goals) \ $(dont_bother_goals) \
all \ all \
APP-% \
DUMP_% \
ECLIPSE-% \ ECLIPSE-% \
PRODUCT-% \
AUX-% \ AUX-% \
boottarball-nodeps \ boottarball-nodeps \
brillo_tests \ brillo_tests \
@ -67,5 +63,8 @@ ANDROID_GOALS := $(filter-out $(KATI_OUTPUT_PATTERNS) $(CKATI) $(MAKEPARALLEL),\
$(sort $(ORIGINAL_MAKECMDGOALS) $(MAKECMDGOALS))) $(sort $(ORIGINAL_MAKECMDGOALS) $(MAKECMDGOALS)))
# Goals we need to pass to Ninja. # Goals we need to pass to Ninja.
NINJA_GOALS := $(filter-out $(NINJA_EXCLUDE_GOALS), $(ANDROID_GOALS)) NINJA_GOALS := $(filter-out $(NINJA_EXCLUDE_GOALS), $(ANDROID_GOALS))
ifndef NINJA_GOALS
NINJA_GOALS := droid
endif
# Goals we need to pass to Kati. # 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 # Provide "PRODUCT-<prodname>-<goal>" targets, which lets you build
# a particular configuration without needing to set up the environment. # a particular configuration without needing to set up the environment.
# #
ifndef KATI
product_goals := $(strip $(filter PRODUCT-%,$(MAKECMDGOALS))) product_goals := $(strip $(filter PRODUCT-%,$(MAKECMDGOALS)))
ifdef product_goals ifdef product_goals
# Scrape the product and build names out of the goal, # 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.) $(error "tests" has been deprecated as a build variant. Use it as a build goal instead.)
endif endif
# The build server wants to do make PRODUCT-dream-installclean # The build server wants to do make PRODUCT-dream-sdk
# which really means TARGET_PRODUCT=dream make installclean. # which really means TARGET_PRODUCT=dream make sdk.
ifneq ($(filter-out $(INTERNAL_VALID_VARIANTS),$(TARGET_BUILD_VARIANT)),) ifneq ($(filter-out $(INTERNAL_VALID_VARIANTS),$(TARGET_BUILD_VARIANT)),)
MAKECMDGOALS := $(MAKECMDGOALS) $(TARGET_BUILD_VARIANT) override MAKECMDGOALS := $(MAKECMDGOALS) $(TARGET_BUILD_VARIANT)
TARGET_BUILD_VARIANT := userdebug TARGET_BUILD_VARIANT := userdebug
default_goal_substitution := default_goal_substitution :=
else else
default_goal_substitution := $(DEFAULT_GOAL) default_goal_substitution := droid
endif endif
# Replace the PRODUCT-* goal with the build goal that it refers to. # Replace the PRODUCT-* goal with the build goal that it refers to.
# Note that this will ensure that it appears in the same relative # Note that this will ensure that it appears in the same relative
# position, in case it matters. # position, in case it matters.
# override MAKECMDGOALS := $(patsubst $(goal_name),$(default_goal_substitution),$(MAKECMDGOALS))
# 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)
endif endif
endif # !KATI
# else: Use the value set in the environment or buildspec.mk. # else: Use the value set in the environment or buildspec.mk.
# --------------------------------------------------------------- # ---------------------------------------------------------------
# Provide "APP-<appname>" targets, which lets you build # Provide "APP-<appname>" targets, which lets you build
# an unbundled app. # an unbundled app.
# #
ifndef KATI
unbundled_goals := $(strip $(filter APP-%,$(MAKECMDGOALS))) unbundled_goals := $(strip $(filter APP-%,$(MAKECMDGOALS)))
ifdef unbundled_goals ifdef unbundled_goals
ifneq ($(words $(unbundled_goals)),1) ifneq ($(words $(unbundled_goals)),1)
$(error Only one APP-* goal may be specified; saw "$(unbundled_goals)") $(error Only one APP-* goal may be specified; saw "$(unbundled_goals)")
endif endif
TARGET_BUILD_APPS := $(strip $(subst -, ,$(patsubst APP-%,%,$(unbundled_goals)))) TARGET_BUILD_APPS := $(strip $(subst -, ,$(patsubst APP-%,%,$(unbundled_goals))))
ifneq ($(filter $(DEFAULT_GOAL),$(MAKECMDGOALS)),) ifneq ($(filter droid,$(MAKECMDGOALS)),)
MAKECMDGOALS := $(patsubst $(unbundled_goals),,$(MAKECMDGOALS)) override MAKECMDGOALS := $(patsubst $(unbundled_goals),,$(MAKECMDGOALS))
else else
MAKECMDGOALS := $(patsubst $(unbundled_goals),$(DEFAULT_GOAL),$(MAKECMDGOALS)) override MAKECMDGOALS := $(patsubst $(unbundled_goals),droid,$(MAKECMDGOALS))
endif endif
.PHONY: $(unbundled_goals)
$(unbundled_goals): $(MAKECMDGOALS)
endif # unbundled_goals endif # unbundled_goals
endif
# Default to building dalvikvm on hosts that support it... # Default to building dalvikvm on hosts that support it...
ifeq ($(HOST_OS),linux) ifeq ($(HOST_OS),linux)