Loading Usage.txt +0 −6 Original line number Diff line number Diff line Loading @@ -26,12 +26,6 @@ Ways to specify what to build: If no targets are specified, the build system will build the images for the configured product and variant. An alternative to setting $TARGET_PRODUCT and $TARGET_BUILD_VARIANT, which you may see in build servers, is to execute: m PRODUCT-<product>-<variant> A target may be a file path. For example, out/host/linux-x86/bin/adb . Note that when giving a relative file path as a target, that path is interpreted relative to the root of the source tree (rather than relative Loading core/envsetup.mk +7 −2 Original line number Diff line number Diff line Loading @@ -82,8 +82,6 @@ CORRECT_BUILD_ENV_SEQUENCE_NUMBER := 13 # --------------------------------------------------------------- # The product defaults to generic on hardware # NOTE: This will be overridden in product_config.mk if make # was invoked with a PRODUCT-xxx-yyy goal. ifeq ($(TARGET_PRODUCT),) TARGET_PRODUCT := aosp_arm endif Loading @@ -94,6 +92,13 @@ ifeq ($(strip $(TARGET_BUILD_VARIANT)),) TARGET_BUILD_VARIANT := eng endif TARGET_BUILD_APPS ?= .KATI_READONLY := \ TARGET_PRODUCT \ TARGET_BUILD_VARIANT \ TARGET_BUILD_APPS # --------------------------------------------------------------- # Set up configuration for host machine. We don't do cross- # compiles except for arm/mips, so the HOST is whatever we are Loading core/main.mk +2 −0 Original line number Diff line number Diff line Loading @@ -196,6 +196,8 @@ $(info ***************************************************************) $(error stopping) endif # These are the valid values of TARGET_BUILD_VARIANT. INTERNAL_VALID_VARIANTS := user userdebug eng ifneq ($(filter-out $(INTERNAL_VALID_VARIANTS),$(TARGET_BUILD_VARIANT)),) $(info ***************************************************************) $(info ***************************************************************) Loading core/ninja_config.mk +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ 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 := all PRODUCT-% NINJA_EXCLUDE_GOALS := all # A list of goals which affect parsing of makefiles and we need to pass to Kati. PARSE_TIME_MAKE_GOALS := \ Loading core/product_config.mk +2 −62 Original line number Diff line number Diff line Loading @@ -78,78 +78,18 @@ $(sort $(shell find $(2) -name "$(1)" -type f | $(SED_EXTENDED) "s:($(2)/?(.*)): endef # --------------------------------------------------------------- # These are the valid values of TARGET_BUILD_VARIANT. Also, if anything else is passed # as the variant in the PRODUCT-$TARGET_BUILD_PRODUCT-$TARGET_BUILD_VARIANT form, # it will be treated as a goal, and the eng variant will be used. 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. # # Check for obsolete PRODUCT- and APP- goals ifeq ($(CALLED_FROM_SETUP),true) product_goals := $(strip $(filter PRODUCT-%,$(MAKECMDGOALS))) ifdef product_goals # Scrape the product and build names out of the goal, # which should be of the form PRODUCT-<productname>-<buildname>. # ifneq ($(words $(product_goals)),1) $(error Only one PRODUCT-* goal may be specified; saw "$(product_goals)") endif goal_name := $(product_goals) product_goals := $(patsubst PRODUCT-%,%,$(product_goals)) product_goals := $(subst -, ,$(product_goals)) ifneq ($(words $(product_goals)),2) $(error Bad PRODUCT-* goal "$(goal_name)") endif # The product they want TARGET_PRODUCT := $(word 1,$(product_goals)) # The variant they want TARGET_BUILD_VARIANT := $(word 2,$(product_goals)) ifeq ($(TARGET_BUILD_VARIANT),tests) $(error "tests" has been deprecated as a build variant. Use it as a build goal instead.) $(error The PRODUCT-* goal is no longer supported. Use `TARGET_PRODUCT=<product> m droid` instead) endif # 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)),) override MAKECMDGOALS := $(MAKECMDGOALS) $(TARGET_BUILD_VARIANT) TARGET_BUILD_VARIANT := userdebug default_goal_substitution := else 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. override MAKECMDGOALS := $(patsubst $(goal_name),$(default_goal_substitution),$(MAKECMDGOALS)) endif endif # CALLED_FROM_SETUP # else: Use the value set in the environment or buildspec.mk. # --------------------------------------------------------------- # Provide "APP-<appname>" targets, which lets you build # an unbundled app. # ifeq ($(CALLED_FROM_SETUP),true) unbundled_goals := $(strip $(filter APP-%,$(MAKECMDGOALS))) ifdef unbundled_goals $(error The APP-* goal is no longer supported. Use `TARGET_BUILD_APPS="<app>" m droid` instead) endif # unbundled_goals endif # Now that we've parsed APP-* and PRODUCT-*, mark these as readonly TARGET_BUILD_APPS ?= .KATI_READONLY := \ TARGET_PRODUCT \ TARGET_BUILD_VARIANT \ TARGET_BUILD_APPS # Default to building dalvikvm on hosts that support it... ifeq ($(HOST_OS),linux) # ... or if the if the option is already set Loading Loading
Usage.txt +0 −6 Original line number Diff line number Diff line Loading @@ -26,12 +26,6 @@ Ways to specify what to build: If no targets are specified, the build system will build the images for the configured product and variant. An alternative to setting $TARGET_PRODUCT and $TARGET_BUILD_VARIANT, which you may see in build servers, is to execute: m PRODUCT-<product>-<variant> A target may be a file path. For example, out/host/linux-x86/bin/adb . Note that when giving a relative file path as a target, that path is interpreted relative to the root of the source tree (rather than relative Loading
core/envsetup.mk +7 −2 Original line number Diff line number Diff line Loading @@ -82,8 +82,6 @@ CORRECT_BUILD_ENV_SEQUENCE_NUMBER := 13 # --------------------------------------------------------------- # The product defaults to generic on hardware # NOTE: This will be overridden in product_config.mk if make # was invoked with a PRODUCT-xxx-yyy goal. ifeq ($(TARGET_PRODUCT),) TARGET_PRODUCT := aosp_arm endif Loading @@ -94,6 +92,13 @@ ifeq ($(strip $(TARGET_BUILD_VARIANT)),) TARGET_BUILD_VARIANT := eng endif TARGET_BUILD_APPS ?= .KATI_READONLY := \ TARGET_PRODUCT \ TARGET_BUILD_VARIANT \ TARGET_BUILD_APPS # --------------------------------------------------------------- # Set up configuration for host machine. We don't do cross- # compiles except for arm/mips, so the HOST is whatever we are Loading
core/main.mk +2 −0 Original line number Diff line number Diff line Loading @@ -196,6 +196,8 @@ $(info ***************************************************************) $(error stopping) endif # These are the valid values of TARGET_BUILD_VARIANT. INTERNAL_VALID_VARIANTS := user userdebug eng ifneq ($(filter-out $(INTERNAL_VALID_VARIANTS),$(TARGET_BUILD_VARIANT)),) $(info ***************************************************************) $(info ***************************************************************) Loading
core/ninja_config.mk +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ 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 := all PRODUCT-% NINJA_EXCLUDE_GOALS := all # A list of goals which affect parsing of makefiles and we need to pass to Kati. PARSE_TIME_MAKE_GOALS := \ Loading
core/product_config.mk +2 −62 Original line number Diff line number Diff line Loading @@ -78,78 +78,18 @@ $(sort $(shell find $(2) -name "$(1)" -type f | $(SED_EXTENDED) "s:($(2)/?(.*)): endef # --------------------------------------------------------------- # These are the valid values of TARGET_BUILD_VARIANT. Also, if anything else is passed # as the variant in the PRODUCT-$TARGET_BUILD_PRODUCT-$TARGET_BUILD_VARIANT form, # it will be treated as a goal, and the eng variant will be used. 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. # # Check for obsolete PRODUCT- and APP- goals ifeq ($(CALLED_FROM_SETUP),true) product_goals := $(strip $(filter PRODUCT-%,$(MAKECMDGOALS))) ifdef product_goals # Scrape the product and build names out of the goal, # which should be of the form PRODUCT-<productname>-<buildname>. # ifneq ($(words $(product_goals)),1) $(error Only one PRODUCT-* goal may be specified; saw "$(product_goals)") endif goal_name := $(product_goals) product_goals := $(patsubst PRODUCT-%,%,$(product_goals)) product_goals := $(subst -, ,$(product_goals)) ifneq ($(words $(product_goals)),2) $(error Bad PRODUCT-* goal "$(goal_name)") endif # The product they want TARGET_PRODUCT := $(word 1,$(product_goals)) # The variant they want TARGET_BUILD_VARIANT := $(word 2,$(product_goals)) ifeq ($(TARGET_BUILD_VARIANT),tests) $(error "tests" has been deprecated as a build variant. Use it as a build goal instead.) $(error The PRODUCT-* goal is no longer supported. Use `TARGET_PRODUCT=<product> m droid` instead) endif # 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)),) override MAKECMDGOALS := $(MAKECMDGOALS) $(TARGET_BUILD_VARIANT) TARGET_BUILD_VARIANT := userdebug default_goal_substitution := else 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. override MAKECMDGOALS := $(patsubst $(goal_name),$(default_goal_substitution),$(MAKECMDGOALS)) endif endif # CALLED_FROM_SETUP # else: Use the value set in the environment or buildspec.mk. # --------------------------------------------------------------- # Provide "APP-<appname>" targets, which lets you build # an unbundled app. # ifeq ($(CALLED_FROM_SETUP),true) unbundled_goals := $(strip $(filter APP-%,$(MAKECMDGOALS))) ifdef unbundled_goals $(error The APP-* goal is no longer supported. Use `TARGET_BUILD_APPS="<app>" m droid` instead) endif # unbundled_goals endif # Now that we've parsed APP-* and PRODUCT-*, mark these as readonly TARGET_BUILD_APPS ?= .KATI_READONLY := \ TARGET_PRODUCT \ TARGET_BUILD_VARIANT \ TARGET_BUILD_APPS # Default to building dalvikvm on hosts that support it... ifeq ($(HOST_OS),linux) # ... or if the if the option is already set Loading