blob: 7929dbb0ac49658f7d95a93b2362ac5300818201 [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
Jean-Baptiste Queruffe03c92011-12-06 10:29:46 -08006ifneq ($(filter /%,$(HOST_OUT_EXECUTABLES)),)
7ABP:=$(HOST_OUT_EXECUTABLES)
8else
Bruce Beareb73dc662010-07-12 07:53:28 -07009ABP:=$(PWD)/$(HOST_OUT_EXECUTABLES)
Jean-Baptiste Queruffe03c92011-12-06 10:29:46 -080010endif
Bruce Beareb73dc662010-07-12 07:53:28 -070011
Jeff Browne33ba4c2011-07-11 22:11:46 -070012# Add the toolchain bin dir if it actually exists
Jean-Baptiste Querua50ef1c2012-04-20 16:15:42 -070013ifneq ($(wildcard $(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6/bin),)
Jeff Browne33ba4c2011-07-11 22:11:46 -070014 # this should be copied to HOST_OUT_EXECUTABLES instead
Jean-Baptiste Querua50ef1c2012-04-20 16:15:42 -070015 ABP:=$(ABP):$(PWD)/prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-4.6/bin
Bruce Beareb73dc662010-07-12 07:53:28 -070016endif
17ANDROID_BUILD_PATHS := $(ABP)
18ANDROID_PREBUILTS := prebuilt/$(HOST_PREBUILT_TAG)
Jean-Baptiste Querua50ef1c2012-04-20 16:15:42 -070019ANDROID_GCC_PREBUILTS := prebuilts/gcc/$(HOST_PREBUILT_TAG)
Bruce Beareb73dc662010-07-12 07:53:28 -070020
21# The "dumpvar" stuff lets you say something like
22#
23# CALLED_FROM_SETUP=true \
24# make -f config/envsetup.make dumpvar-TARGET_OUT
25# or
26# CALLED_FROM_SETUP=true \
27# make -f config/envsetup.make dumpvar-abs-HOST_OUT_EXECUTABLES
28#
29# The plain (non-abs) version just dumps the value of the named variable.
30# The "abs" version will treat the variable as a path, and dumps an
31# absolute path to it.
32#
33dumpvar_goals := \
34 $(strip $(patsubst dumpvar-%,%,$(filter dumpvar-%,$(MAKECMDGOALS))))
35ifdef dumpvar_goals
36
37 ifneq ($(words $(dumpvar_goals)),1)
38 $(error Only one "dumpvar-" goal allowed. Saw "$(MAKECMDGOALS)")
39 endif
40
41 # If the goal is of the form "dumpvar-abs-VARNAME", then
42 # treat VARNAME as a path and return the absolute path to it.
43 absolute_dumpvar := $(strip $(filter abs-%,$(dumpvar_goals)))
44 ifdef absolute_dumpvar
45 dumpvar_goals := $(patsubst abs-%,%,$(dumpvar_goals))
Jean-Baptiste Queru8af0efd2011-12-06 16:32:40 -080046 ifneq ($(filter /%,$($(dumpvar_goals))),)
47 DUMPVAR_VALUE := $($(dumpvar_goals))
48 else
49 DUMPVAR_VALUE := $(PWD)/$($(dumpvar_goals))
50 endif
Bruce Beareb73dc662010-07-12 07:53:28 -070051 dumpvar_target := dumpvar-abs-$(dumpvar_goals)
52 else
53 DUMPVAR_VALUE := $($(dumpvar_goals))
54 dumpvar_target := dumpvar-$(dumpvar_goals)
55 endif
56
57.PHONY: $(dumpvar_target)
58$(dumpvar_target):
59 @echo $(DUMPVAR_VALUE)
60
61endif # dumpvar_goals
62
63ifneq ($(dumpvar_goals),report_config)
64PRINT_BUILD_CONFIG:=
65endif
66
67endif # CALLED_FROM_SETUP
68
69
70ifneq ($(PRINT_BUILD_CONFIG),)
Conley Owens5f1c9ba2012-02-07 11:16:42 -080071HOST_OS_EXTRA:=$(shell python -c "import platform; print(platform.platform())")
Bruce Beareb73dc662010-07-12 07:53:28 -070072$(info ============================================)
73$(info PLATFORM_VERSION_CODENAME=$(PLATFORM_VERSION_CODENAME))
74$(info PLATFORM_VERSION=$(PLATFORM_VERSION))
75$(info TARGET_PRODUCT=$(TARGET_PRODUCT))
76$(info TARGET_BUILD_VARIANT=$(TARGET_BUILD_VARIANT))
Bruce Beareb73dc662010-07-12 07:53:28 -070077$(info TARGET_BUILD_TYPE=$(TARGET_BUILD_TYPE))
78$(info TARGET_BUILD_APPS=$(TARGET_BUILD_APPS))
79$(info TARGET_ARCH=$(TARGET_ARCH))
Bruce Beare8ee0dfd2010-10-14 12:21:58 -070080$(info TARGET_ARCH_VARIANT=$(TARGET_ARCH_VARIANT))
Bruce Beareb73dc662010-07-12 07:53:28 -070081$(info HOST_ARCH=$(HOST_ARCH))
82$(info HOST_OS=$(HOST_OS))
Conley Owens5f1c9ba2012-02-07 11:16:42 -080083$(info HOST_OS_EXTRA=$(HOST_OS_EXTRA))
Bruce Beareb73dc662010-07-12 07:53:28 -070084$(info HOST_BUILD_TYPE=$(HOST_BUILD_TYPE))
85$(info BUILD_ID=$(BUILD_ID))
Jean-Baptiste Queruffe03c92011-12-06 10:29:46 -080086$(info OUT_DIR=$(OUT_DIR))
Bruce Beareb73dc662010-07-12 07:53:28 -070087$(info ============================================)
88endif