Bruce Beare | b73dc66 | 2010-07-12 07:53:28 -0700 | [diff] [blame] | 1 | # --------------------------------------------------------------- |
| 2 | # the setpath shell function in envsetup.sh uses this to figure out |
| 3 | # what to add to the path given the config we have chosen. |
| 4 | ifeq ($(CALLED_FROM_SETUP),true) |
| 5 | |
Bruce Beare | b73dc66 | 2010-07-12 07:53:28 -0700 | [diff] [blame] | 6 | ANDROID_PREBUILTS := prebuilt/$(HOST_PREBUILT_TAG) |
Jing Yu | f5172c7 | 2012-03-29 20:45:50 -0700 | [diff] [blame] | 7 | ANDROID_GCC_PREBUILTS := prebuilts/gcc/$(HOST_PREBUILT_TAG) |
Yi Kong | dfd00b1 | 2019-05-21 16:00:04 -0700 | [diff] [blame] | 8 | ANDROID_CLANG_PREBUILTS := prebuilts/clang/host/$(HOST_PREBUILT_TAG) |
Bruce Beare | b73dc66 | 2010-07-12 07:53:28 -0700 | [diff] [blame] | 9 | |
Ying Wang | 08800fd | 2016-03-03 20:57:21 -0800 | [diff] [blame] | 10 | # Dump mulitple variables to "<var>=<value>" pairs, one per line. |
| 11 | # The output may be executed as bash script. |
| 12 | # Input variables: |
| 13 | # DUMP_MANY_VARS: the list of variable names. |
| 14 | # DUMP_VAR_PREFIX: an optional prefix of the variable name added to the output. |
Cole Faust | 2ce1fd9 | 2020-11-03 23:59:50 +0000 | [diff] [blame] | 15 | # The value is printed in parts because large variables like PRODUCT_PACKAGES |
| 16 | # can exceed the maximum linux command line size |
Ying Wang | 08800fd | 2016-03-03 20:57:21 -0800 | [diff] [blame] | 17 | .PHONY: dump-many-vars |
| 18 | dump-many-vars : |
Dan Willemsen | 8cf5aa5 | 2017-10-17 01:30:14 -0700 | [diff] [blame] | 19 | @$(foreach v, $(DUMP_MANY_VARS),\ |
Cole Faust | 2ce1fd9 | 2020-11-03 23:59:50 +0000 | [diff] [blame] | 20 | printf "%s='%s" '$(DUMP_VAR_PREFIX)$(v)' '$(firstword $($(v)))'; \ |
| 21 | $(foreach part, $(wordlist 2, $(words $($(v))), $($(v))),\ |
| 22 | printf " %s" '$(part)'$(newline))\ |
| 23 | printf "'\n";) |
Ying Wang | 08800fd | 2016-03-03 20:57:21 -0800 | [diff] [blame] | 24 | |
| 25 | endif # CALLED_FROM_SETUP |
Cole Faust | ec8316d | 2022-04-04 11:52:52 -0700 | [diff] [blame] | 26 | |
| 27 | ifneq (,$(RBC_DUMP_CONFIG_FILE)) |
| 28 | $(call dump-variables-rbc,$(RBC_DUMP_CONFIG_FILE)) |
| 29 | endif |