From 20f99a60eabe1ae79c90263df85ed5f15f6f9bde Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Thu, 12 Oct 2017 01:35:14 -0700 Subject: [PATCH] Use CALLED_FROM_SETUP instead of KATI So that we can use kati instead of make for the initial config loading. Test: m clean; m nothing Test: USE_GOMA=true m nothing Test: m PRODUCT-aosp_x86-sdk Test: m APP-Calculator Test: multiproduct_kati -only-config (on AOSP and internal master) Change-Id: I5d3af847607fa48868c2045401977eca37dc6ae1 --- core/config.mk | 4 ++-- core/envsetup.mk | 2 +- core/product_config.mk | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/config.mk b/core/config.mk index 566faaeee..7007c5d1d 100644 --- a/core/config.mk +++ b/core/config.mk @@ -304,7 +304,7 @@ combo_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) include $(BUILD_SYSTEM)/combo/select.mk endif -ifndef KATI +ifeq ($(CALLED_FROM_SETUP),true) include $(BUILD_SYSTEM)/ccache.mk include $(BUILD_SYSTEM)/goma.mk @@ -900,7 +900,7 @@ dont_bother_goals := out \ vbmetaimage-nodeps \ product-graph dump-products -ifndef KATI +ifeq ($(CALLED_FROM_SETUP),true) include $(BUILD_SYSTEM)/ninja_config.mk include $(BUILD_SYSTEM)/soong_config.mk endif diff --git a/core/envsetup.mk b/core/envsetup.mk index c99c70ff9..53723367b 100644 --- a/core/envsetup.mk +++ b/core/envsetup.mk @@ -639,7 +639,7 @@ ifeq (,$(strip $(DIST_DIR))) DIST_DIR := $(OUT_DIR)/dist endif -ifndef KATI +ifeq ($(CALLED_FROM_SETUP),true) PRINT_BUILD_CONFIG ?= true endif diff --git a/core/product_config.mk b/core/product_config.mk index cd62fb2e4..492219b79 100644 --- a/core/product_config.mk +++ b/core/product_config.mk @@ -88,7 +88,7 @@ INTERNAL_VALID_VARIANTS := user userdebug eng # Provide "PRODUCT--" targets, which lets you build # a particular configuration without needing to set up the environment. # -ifndef KATI +ifeq ($(CALLED_FROM_SETUP),true) product_goals := $(strip $(filter PRODUCT-%,$(MAKECMDGOALS))) ifdef product_goals # Scrape the product and build names out of the goal, @@ -129,14 +129,14 @@ ifdef product_goals # position, in case it matters. override MAKECMDGOALS := $(patsubst $(goal_name),$(default_goal_substitution),$(MAKECMDGOALS)) endif -endif # !KATI +endif # CALLED_FROM_SETUP # else: Use the value set in the environment or buildspec.mk. # --------------------------------------------------------------- # Provide "APP-" targets, which lets you build # an unbundled app. # -ifndef KATI +ifeq ($(CALLED_FROM_SETUP),true) unbundled_goals := $(strip $(filter APP-%,$(MAKECMDGOALS))) ifdef unbundled_goals ifneq ($(words $(unbundled_goals)),1)