blob: 6f3d14f20d1efc80d79420530c4a82d2e5b17fa0 [file] [log] [blame]
Bruce Beareb73dc662010-07-12 07:53:28 -07001# ---------------------------------------------------------------
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.
4ifeq ($(CALLED_FROM_SETUP),true)
5
Dan Willemsen60d9c672016-05-27 15:15:47 -07006ifneq ($(filter /%,$(SOONG_HOST_OUT_EXECUTABLES)),)
7ABP := $(SOONG_HOST_OUT_EXECUTABLES)
Jean-Baptiste Queruffe03c92011-12-06 10:29:46 -08008else
Dan Willemsen60d9c672016-05-27 15:15:47 -07009ABP := $(PWD)/$(SOONG_HOST_OUT_EXECUTABLES)
10endif
11ifneq ($(filter /%,$(HOST_OUT_EXECUTABLES)),)
12ABP := $(ABP):$(HOST_OUT_EXECUTABLES)
13else
14ABP := $(ABP):$(PWD)/$(HOST_OUT_EXECUTABLES)
Jean-Baptiste Queruffe03c92011-12-06 10:29:46 -080015endif
Bruce Beareb73dc662010-07-12 07:53:28 -070016
Bruce Beareb73dc662010-07-12 07:53:28 -070017ANDROID_BUILD_PATHS := $(ABP)
18ANDROID_PREBUILTS := prebuilt/$(HOST_PREBUILT_TAG)
Jing Yuf5172c72012-03-29 20:45:50 -070019ANDROID_GCC_PREBUILTS := prebuilts/gcc/$(HOST_PREBUILT_TAG)
Yi Kongdfd00b12019-05-21 16:00:04 -070020ANDROID_CLANG_PREBUILTS := prebuilts/clang/host/$(HOST_PREBUILT_TAG)
Bruce Beareb73dc662010-07-12 07:53:28 -070021
Ying Wang08800fd2016-03-03 20:57:21 -080022# Dump mulitple variables to "<var>=<value>" pairs, one per line.
23# The output may be executed as bash script.
24# Input variables:
25# DUMP_MANY_VARS: the list of variable names.
26# DUMP_VAR_PREFIX: an optional prefix of the variable name added to the output.
Cole Faust2ce1fd92020-11-03 23:59:50 +000027# The value is printed in parts because large variables like PRODUCT_PACKAGES
28# can exceed the maximum linux command line size
Ying Wang08800fd2016-03-03 20:57:21 -080029.PHONY: dump-many-vars
30dump-many-vars :
Dan Willemsen8cf5aa52017-10-17 01:30:14 -070031 @$(foreach v, $(DUMP_MANY_VARS),\
Cole Faust2ce1fd92020-11-03 23:59:50 +000032 printf "%s='%s" '$(DUMP_VAR_PREFIX)$(v)' '$(firstword $($(v)))'; \
33 $(foreach part, $(wordlist 2, $(words $($(v))), $($(v))),\
34 printf " %s" '$(part)'$(newline))\
35 printf "'\n";)
Ying Wang08800fd2016-03-03 20:57:21 -080036
37endif # CALLED_FROM_SETUP
Cole Faustec8316d2022-04-04 11:52:52 -070038
39ifneq (,$(RBC_DUMP_CONFIG_FILE))
40$(call dump-variables-rbc,$(RBC_DUMP_CONFIG_FILE))
41endif