Loading core/config.mk +30 −0 Original line number Diff line number Diff line Loading @@ -252,6 +252,10 @@ endef # Initialize SOONG_CONFIG_NAMESPACES so that it isn't recursive. SOONG_CONFIG_NAMESPACES := # TODO(asmundak): remove add_soong_config_namespace, add_soong_config_var, # and add_soong_config_var_value once all their usages are replaced with # soong_config_set/soong_config_append. # The add_soong_config_namespace function adds a namespace and initializes it # to be empty. # $1 is the namespace. Loading Loading @@ -282,6 +286,32 @@ $(eval $2 := $3) \ $(call add_soong_config_var,$1,$2) endef # Soong config namespace variables manipulation. # # internal utility to define a namespace and a variable in it. define soong_config_define_internal $(if $(filter $1,$(SOONG_CONFIG_NAMESPACES)),,$(eval SOONG_CONFIG_NAMESPACES:=$(SOONG_CONFIG_NAMESPACES) $1)) \ $(if $(filter $2,$(SOONG_CONFIG_$(strip $1))),,$(eval SOONG_CONFIG_$(strip $1):=$(SOONG_CONFIG_$(strip $1)) $2)) endef # soong_config_set defines the variable in the given Soong config namespace # and sets its value. If the namespace does not exist, it will be defined. # $1 is the namespace. $2 is the variable name. $3 is the variable value. # Ex: $(call soong_config_set,acme,COOL_FEATURE,true) define soong_config_set $(call soong_config_define_internal,$1,$2) \ $(eval SOONG_CONFIG_$(strip $1)_$(strip $2):=$3) endef # soong_config_append appends to the value of the variable in the given Soong # config namespace. If the varabile does not exist, it will be defined. If the # namespace does not exist, it will be defined. # $1 is the namespace, $2 is the variable name, $3 is the value define soong_config_append $(call soong_config_define_internal,$1,$2) \ $(eval SOONG_CONFIG_$(strip $1)_$(strip $2):=$(SOONG_CONFIG_$(strip $1)_$(strip $2)) $3) endef # Set the extensions used for various packages COMMON_PACKAGE_SUFFIX := .zip COMMON_JAVA_PACKAGE_SUFFIX := .jar Loading core/product_config.mk +7 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,13 @@ define is-board-platform-in-list2 $(filter $(1),$(TARGET_BOARD_PLATFORM)) endef # Return empty unless the board is QCOM define is-vendor-board-qcom $(if $(strip $(TARGET_BOARD_PLATFORM) $(QCOM_BOARD_PLATFORMS)),\ $(filter $(TARGET_BOARD_PLATFORM),$(QCOM_BOARD_PLATFORMS)),\ $(error both TARGET_BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM) and QCOM_BOARD_PLATFORMS=$(QCOM_BOARD_PLATFORMS))) endef # --------------------------------------------------------------- # Check for obsolete PRODUCT- and APP- goals ifeq ($(CALLED_FROM_SETUP),true) Loading Loading
core/config.mk +30 −0 Original line number Diff line number Diff line Loading @@ -252,6 +252,10 @@ endef # Initialize SOONG_CONFIG_NAMESPACES so that it isn't recursive. SOONG_CONFIG_NAMESPACES := # TODO(asmundak): remove add_soong_config_namespace, add_soong_config_var, # and add_soong_config_var_value once all their usages are replaced with # soong_config_set/soong_config_append. # The add_soong_config_namespace function adds a namespace and initializes it # to be empty. # $1 is the namespace. Loading Loading @@ -282,6 +286,32 @@ $(eval $2 := $3) \ $(call add_soong_config_var,$1,$2) endef # Soong config namespace variables manipulation. # # internal utility to define a namespace and a variable in it. define soong_config_define_internal $(if $(filter $1,$(SOONG_CONFIG_NAMESPACES)),,$(eval SOONG_CONFIG_NAMESPACES:=$(SOONG_CONFIG_NAMESPACES) $1)) \ $(if $(filter $2,$(SOONG_CONFIG_$(strip $1))),,$(eval SOONG_CONFIG_$(strip $1):=$(SOONG_CONFIG_$(strip $1)) $2)) endef # soong_config_set defines the variable in the given Soong config namespace # and sets its value. If the namespace does not exist, it will be defined. # $1 is the namespace. $2 is the variable name. $3 is the variable value. # Ex: $(call soong_config_set,acme,COOL_FEATURE,true) define soong_config_set $(call soong_config_define_internal,$1,$2) \ $(eval SOONG_CONFIG_$(strip $1)_$(strip $2):=$3) endef # soong_config_append appends to the value of the variable in the given Soong # config namespace. If the varabile does not exist, it will be defined. If the # namespace does not exist, it will be defined. # $1 is the namespace, $2 is the variable name, $3 is the value define soong_config_append $(call soong_config_define_internal,$1,$2) \ $(eval SOONG_CONFIG_$(strip $1)_$(strip $2):=$(SOONG_CONFIG_$(strip $1)_$(strip $2)) $3) endef # Set the extensions used for various packages COMMON_PACKAGE_SUFFIX := .zip COMMON_JAVA_PACKAGE_SUFFIX := .jar Loading
core/product_config.mk +7 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,13 @@ define is-board-platform-in-list2 $(filter $(1),$(TARGET_BOARD_PLATFORM)) endef # Return empty unless the board is QCOM define is-vendor-board-qcom $(if $(strip $(TARGET_BOARD_PLATFORM) $(QCOM_BOARD_PLATFORMS)),\ $(filter $(TARGET_BOARD_PLATFORM),$(QCOM_BOARD_PLATFORMS)),\ $(error both TARGET_BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM) and QCOM_BOARD_PLATFORMS=$(QCOM_BOARD_PLATFORMS))) endef # --------------------------------------------------------------- # Check for obsolete PRODUCT- and APP- goals ifeq ($(CALLED_FROM_SETUP),true) Loading