Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c9931fb authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Add functions for easier vendor var definitions." am: 24e2f7c0

Change-Id: Ie75048860bad50197be04013e0cfa4401c54b253
parents 2dafa806 24e2f7c0
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
@@ -228,6 +228,37 @@ endef
# Initialize SOONG_CONFIG_NAMESPACES so that it isn't recursive.
SOONG_CONFIG_NAMESPACES :=

# The add_soong_config_namespace function adds a namespace and initializes it
# to be empty.
# $1 is the namespace.
# Ex: $(call add_soong_config_namespace,acme)

define add_soong_config_namespace
$(eval SOONG_CONFIG_NAMESPACES += $1) \
$(eval SOONG_CONFIG_$1 :=)
endef

# The add_soong_config_var function adds a soong config variable to
# SOONG_CONFIG_*. The variable and its value are then be available to a
# soong_config_module_type in an Android.bp file.
# $1 is the namespace. $2 is the variable name.
# Ex: $(call add_soong_config_var,acme,COOL_FEATURE)

define add_soong_config_var
$(eval SOONG_CONFIG_$1 += $2) \
$(eval SOONG_CONFIG_$1_$2 := $($2))
endef

# The add_soong_config_var_value function defines a make variable and also adds
# the variable to SOONG_CONFIG_*.
# $1 is the namespace. $2 is the variable name. $3 is the variable value.
# Ex: $(call add_soong_config_var_value,acme,COOL_FEATURE,true)

define add_soong_config_var_value
$(eval $2 := $3) \
$(call add_soong_config_var,$1,$2)
endef

# Set the extensions used for various packages
COMMON_PACKAGE_SUFFIX := .zip
COMMON_JAVA_PACKAGE_SUFFIX := .jar