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 | |
| 6 | ABP:=$(PWD)/$(HOST_OUT_EXECUTABLES) |
| 7 | |
Jeff Brown | e33ba4c | 2011-07-11 22:11:46 -0700 | [diff] [blame] | 8 | # Add the toolchain bin dir if it actually exists |
| 9 | ifneq ($(wildcard $(PWD)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-linux-androideabi-4.4.x/bin),) |
| 10 | # this should be copied to HOST_OUT_EXECUTABLES instead |
| 11 | ABP:=$(ABP):$(PWD)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-linux-androideabi-4.4.x/bin |
Bruce Beare | b73dc66 | 2010-07-12 07:53:28 -0700 | [diff] [blame] | 12 | endif |
| 13 | ANDROID_BUILD_PATHS := $(ABP) |
| 14 | ANDROID_PREBUILTS := prebuilt/$(HOST_PREBUILT_TAG) |
| 15 | |
| 16 | # The "dumpvar" stuff lets you say something like |
| 17 | # |
| 18 | # CALLED_FROM_SETUP=true \ |
| 19 | # make -f config/envsetup.make dumpvar-TARGET_OUT |
| 20 | # or |
| 21 | # CALLED_FROM_SETUP=true \ |
| 22 | # make -f config/envsetup.make dumpvar-abs-HOST_OUT_EXECUTABLES |
| 23 | # |
| 24 | # The plain (non-abs) version just dumps the value of the named variable. |
| 25 | # The "abs" version will treat the variable as a path, and dumps an |
| 26 | # absolute path to it. |
| 27 | # |
| 28 | dumpvar_goals := \ |
| 29 | $(strip $(patsubst dumpvar-%,%,$(filter dumpvar-%,$(MAKECMDGOALS)))) |
| 30 | ifdef dumpvar_goals |
| 31 | |
| 32 | ifneq ($(words $(dumpvar_goals)),1) |
| 33 | $(error Only one "dumpvar-" goal allowed. Saw "$(MAKECMDGOALS)") |
| 34 | endif |
| 35 | |
| 36 | # If the goal is of the form "dumpvar-abs-VARNAME", then |
| 37 | # treat VARNAME as a path and return the absolute path to it. |
| 38 | absolute_dumpvar := $(strip $(filter abs-%,$(dumpvar_goals))) |
| 39 | ifdef absolute_dumpvar |
| 40 | dumpvar_goals := $(patsubst abs-%,%,$(dumpvar_goals)) |
| 41 | DUMPVAR_VALUE := $(PWD)/$($(dumpvar_goals)) |
| 42 | dumpvar_target := dumpvar-abs-$(dumpvar_goals) |
| 43 | else |
| 44 | DUMPVAR_VALUE := $($(dumpvar_goals)) |
| 45 | dumpvar_target := dumpvar-$(dumpvar_goals) |
| 46 | endif |
| 47 | |
| 48 | .PHONY: $(dumpvar_target) |
| 49 | $(dumpvar_target): |
| 50 | @echo $(DUMPVAR_VALUE) |
| 51 | |
| 52 | endif # dumpvar_goals |
| 53 | |
| 54 | ifneq ($(dumpvar_goals),report_config) |
| 55 | PRINT_BUILD_CONFIG:= |
| 56 | endif |
| 57 | |
| 58 | endif # CALLED_FROM_SETUP |
| 59 | |
| 60 | |
| 61 | ifneq ($(PRINT_BUILD_CONFIG),) |
| 62 | $(info ============================================) |
| 63 | $(info PLATFORM_VERSION_CODENAME=$(PLATFORM_VERSION_CODENAME)) |
| 64 | $(info PLATFORM_VERSION=$(PLATFORM_VERSION)) |
| 65 | $(info TARGET_PRODUCT=$(TARGET_PRODUCT)) |
| 66 | $(info TARGET_BUILD_VARIANT=$(TARGET_BUILD_VARIANT)) |
Bruce Beare | b73dc66 | 2010-07-12 07:53:28 -0700 | [diff] [blame] | 67 | $(info TARGET_BUILD_TYPE=$(TARGET_BUILD_TYPE)) |
| 68 | $(info TARGET_BUILD_APPS=$(TARGET_BUILD_APPS)) |
| 69 | $(info TARGET_ARCH=$(TARGET_ARCH)) |
Bruce Beare | 8ee0dfd | 2010-10-14 12:21:58 -0700 | [diff] [blame] | 70 | $(info TARGET_ARCH_VARIANT=$(TARGET_ARCH_VARIANT)) |
Bruce Beare | b73dc66 | 2010-07-12 07:53:28 -0700 | [diff] [blame] | 71 | $(info HOST_ARCH=$(HOST_ARCH)) |
| 72 | $(info HOST_OS=$(HOST_OS)) |
| 73 | $(info HOST_BUILD_TYPE=$(HOST_BUILD_TYPE)) |
| 74 | $(info BUILD_ID=$(BUILD_ID)) |
| 75 | $(info ============================================) |
| 76 | endif |