Rashed Abdel-Tawab | dfc3d18 | 2019-09-06 10:44:50 -0700 | [diff] [blame] | 1 | PATH_OVERRIDE_SOONG := $(shell echo $(TOOLS_PATH_OVERRIDE) | sed -e 's|$$|$$$$|g') |
| 2 | |
Rashed Abdel-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 3 | # Add variables that we wish to make available to soong here. |
| 4 | EXPORT_TO_SOONG := \ |
| 5 | KERNEL_ARCH \ |
Rashed Abdel-Tawab | ba5ea35 | 2019-09-07 17:01:13 -0700 | [diff] [blame] | 6 | KERNEL_BUILD_OUT_PREFIX \ |
Rashed Abdel-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 7 | KERNEL_CROSS_COMPILE \ |
Rashed Abdel-Tawab | fb35b9d | 2019-09-05 21:21:13 -0700 | [diff] [blame] | 8 | KERNEL_MAKE_CMD \ |
Rashed Abdel-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 9 | KERNEL_MAKE_FLAGS \ |
Rashed Abdel-Tawab | dfc3d18 | 2019-09-06 10:44:50 -0700 | [diff] [blame] | 10 | PATH_OVERRIDE_SOONG \ |
Rashed Abdel-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 11 | 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 | |
| 18 | SOONG_CONFIG_NAMESPACES += lineageVarsPlugin |
| 19 | |
| 20 | SOONG_CONFIG_lineageVarsPlugin := |
| 21 | |
| 22 | define addVar |
| 23 | SOONG_CONFIG_lineageVarsPlugin += $(1) |
| 24 | SOONG_CONFIG_lineageVarsPlugin_$(1) := $$(subst ",\",$$($1)) |
| 25 | endef |
| 26 | |
| 27 | $(foreach v,$(EXPORT_TO_SOONG),$(eval $(call addVar,$(v)))) |