blob: 38d7164b447a1a839805e1b7048e4abc7aabf29d [file] [log] [blame]
dianlujitaob492f3f2020-09-11 13:23:18 +08001PATH_OVERRIDE_SOONG := $(shell echo $(TOOLS_PATH_OVERRIDE))
Rashed Abdel-Tawabdfc3d182019-09-06 10:44:50 -07002
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 \
Rashed Abdel-Tawabba5ea352019-09-07 17:01:13 -07006 KERNEL_BUILD_OUT_PREFIX \
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -07007 KERNEL_CROSS_COMPILE \
Rashed Abdel-Tawabfb35b9d2019-09-05 21:21:13 -07008 KERNEL_MAKE_CMD \
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -07009 KERNEL_MAKE_FLAGS \
Rashed Abdel-Tawabdfc3d182019-09-06 10:44:50 -070010 PATH_OVERRIDE_SOONG \
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -070011 TARGET_KERNEL_CONFIG \
12 TARGET_KERNEL_SOURCE
13
14# Setup SOONG_CONFIG_* vars to export the vars listed above.
15# Documentation here:
16# https://github.com/LineageOS/android_build_soong/commit/8328367c44085b948c003116c0ed74a047237a69
17
Jackeagled6811aa2019-09-24 08:26:40 +020018SOONG_CONFIG_NAMESPACES += blissVarsPlugin
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -070019
Jackeagled6811aa2019-09-24 08:26:40 +020020SOONG_CONFIG_blissVarsPlugin :=
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -070021
22define addVar
Jackeagled6811aa2019-09-24 08:26:40 +020023 SOONG_CONFIG_blissVarsPlugin += $(1)
24 SOONG_CONFIG_blissVarsPlugin_$(1) := $$(subst ",\",$$($1))
Rashed Abdel-Tawab9fa7e802018-09-18 21:53:24 -070025endef
26
27$(foreach v,$(EXPORT_TO_SOONG),$(eval $(call addVar,$(v))))