blob: fbdbd04ee88d1a238d0d9068670495af39822636 [file] [log] [blame]
Rashed Abdel-Tawabdfc3d182019-09-06 10:44:50 -07001PATH_OVERRIDE_SOONG := $(shell echo $(TOOLS_PATH_OVERRIDE) | sed -e 's|$$|$$$$|g')
2
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -07003# Add variables that we wish to make available to soong here.
4EXPORT_TO_SOONG := \
5 KERNEL_ARCH \
6 KERNEL_CROSS_COMPILE \
Rashed Abdel-Tawabfb35b9d2019-09-05 21:21:13 -07007 KERNEL_MAKE_CMD \
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -07008 KERNEL_MAKE_FLAGS \
Rashed Abdel-Tawabdfc3d182019-09-06 10:44:50 -07009 PATH_OVERRIDE_SOONG \
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -070010 TARGET_KERNEL_CONFIG \
11 TARGET_KERNEL_SOURCE
12
13# Setup SOONG_CONFIG_* vars to export the vars listed above.
14# Documentation here:
15# https://github.com/LineageOS/android_build_soong/commit/8328367c44085b948c003116c0ed74a047237a69
16
17SOONG_CONFIG_NAMESPACES += lineageVarsPlugin
18
19SOONG_CONFIG_lineageVarsPlugin :=
20
21define addVar
22 SOONG_CONFIG_lineageVarsPlugin += $(1)
23 SOONG_CONFIG_lineageVarsPlugin_$(1) := $$(subst ",\",$$($1))
24endef
25
26$(foreach v,$(EXPORT_TO_SOONG),$(eval $(call addVar,$(v))))