Rashed Abdel-Tawab | 9fa7e80 | 2018-09-18 21:53:24 -0700 | [diff] [blame] | 1 | # Add variables that we wish to make available to soong here. |
| 2 | EXPORT_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 | |
| 13 | SOONG_CONFIG_NAMESPACES += lineageVarsPlugin |
| 14 | |
| 15 | SOONG_CONFIG_lineageVarsPlugin := |
| 16 | |
| 17 | define addVar |
| 18 | SOONG_CONFIG_lineageVarsPlugin += $(1) |
| 19 | SOONG_CONFIG_lineageVarsPlugin_$(1) := $$(subst ",\",$$($1)) |
| 20 | endef |
| 21 | |
| 22 | $(foreach v,$(EXPORT_TO_SOONG),$(eval $(call addVar,$(v)))) |