blob: 82dedad4aacd8d1399315a36eaaa4a109162b15b [file] [log] [blame]
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -07001# Add variables that we wish to make available to soong here.
2EXPORT_TO_SOONG := \
3 KERNEL_ARCH \
4 KERNEL_CROSS_COMPILE \
5 KERNEL_MAKE_FLAGS \
6 TARGET_KERNEL_CONFIG \
7 TARGET_KERNEL_SOURCE
8
9# Setup SOONG_CONFIG_* vars to export the vars listed above.
10# Documentation here:
11# https://github.com/LineageOS/android_build_soong/commit/8328367c44085b948c003116c0ed74a047237a69
12
13SOONG_CONFIG_NAMESPACES += lineageVarsPlugin
14
15SOONG_CONFIG_lineageVarsPlugin :=
16
17define addVar
18 SOONG_CONFIG_lineageVarsPlugin += $(1)
19 SOONG_CONFIG_lineageVarsPlugin_$(1) := $$(subst ",\",$$($1))
20endef
21
22$(foreach v,$(EXPORT_TO_SOONG),$(eval $(call addVar,$(v))))