From 1fe28d332e032bb1bce455b92dc0d41beda43e57 Mon Sep 17 00:00:00 2001 From: Jeff Gaston Date: Tue, 21 Nov 2017 15:05:07 -0800 Subject: [PATCH] Export PRODUCT_SOONG_NAMESPACES to Soong Bug: 65683273 Test: put 'PRODUCT_SOONG_NAMESPACES := jeff-test/dir1' \ in a .mk file and observe its value copied into \ out/soong/soong.variables Change-Id: I2b61caa46f40f35ccecf64da88918b73180e02e8 --- core/product.mk | 1 + core/product_config.mk | 4 ++++ core/soong_config.mk | 2 ++ 3 files changed, 7 insertions(+) diff --git a/core/product.mk b/core/product.mk index c01a856f7..f15f6b370 100644 --- a/core/product.mk +++ b/core/product.mk @@ -102,6 +102,7 @@ _product_var_list := \ PRODUCT_SDK_ADDON_COPY_MODULES \ PRODUCT_SDK_ADDON_DOC_MODULES \ PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP \ + PRODUCT_SOONG_NAMESPACES \ PRODUCT_DEFAULT_WIFI_CHANNELS \ PRODUCT_DEFAULT_DEV_CERTIFICATE \ PRODUCT_RESTRICT_VENDOR_FILES \ diff --git a/core/product_config.mk b/core/product_config.mk index 4e2d5aefb..5b0e2574e 100644 --- a/core/product_config.mk +++ b/core/product_config.mk @@ -480,3 +480,7 @@ PRODUCT_CFI_EXCLUDE_PATHS := \ # Whether any paths should have CFI enabled for components PRODUCT_CFI_INCLUDE_PATHS := \ $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_CFI_INCLUDE_PATHS)) + +# which Soong namespaces to export to Make +PRODUCT_SOONG_NAMESPACES := + $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SOONG_NAMESPACES)) diff --git a/core/soong_config.mk b/core/soong_config.mk index a90e5af4f..6f5ca4e25 100644 --- a/core/soong_config.mk +++ b/core/soong_config.mk @@ -121,6 +121,8 @@ $(call add_json_bool, UseGoma, $(filter-out false,$(US $(call add_json_str, DistDir, $(if $(dist_goal), $(DIST_DIR))) +$(call add_json_list, NamespacesToExport, $(PRODUCT_SOONG_NAMESPACES)) + _contents := $(subst $(comma)$(newline)__SV_END,$(newline)}$(newline),$(_contents)__SV_END) $(file >$(SOONG_VARIABLES).tmp,$(_contents))