• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4ifeq ($(CALLED_FROM_SETUP),true)
5
6ifneq ($(filter /%,$(SOONG_HOST_OUT_EXECUTABLES)),)
7ABP := $(SOONG_HOST_OUT_EXECUTABLES)
8else
9ABP := $(PWD)/$(SOONG_HOST_OUT_EXECUTABLES)
10endif
11ifneq ($(filter /%,$(HOST_OUT_EXECUTABLES)),)
12ABP := $(ABP):$(HOST_OUT_EXECUTABLES)
13else
14ABP := $(ABP):$(PWD)/$(HOST_OUT_EXECUTABLES)
15endif
16
17ANDROID_BUILD_PATHS := $(ABP)
18ANDROID_PREBUILTS := prebuilt/$(HOST_PREBUILT_TAG)
19ANDROID_GCC_PREBUILTS := prebuilts/gcc/$(HOST_PREBUILT_TAG)
20ANDROID_CLANG_PREBUILTS := prebuilts/clang/host/$(HOST_PREBUILT_TAG)
21
22# 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.
27# The value is printed in parts because large variables like PRODUCT_PACKAGES
28# can exceed the maximum linux command line size
29.PHONY: dump-many-vars
30dump-many-vars :
31	@$(foreach v, $(DUMP_MANY_VARS),\
32	  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";)
36
37endif # CALLED_FROM_SETUP
38