diff options
author | Nico Huber <nico.h@gmx.de> | 2017-08-23 23:48:13 +0200 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-09-06 04:36:56 +0000 |
commit | 7a1fbdb1e61dbb76daf53f3ac291eed3a36dfb42 (patch) | |
tree | 18eb31e8f3a82911c49fdfc229b7a9b36281df20 /Makefile.inc | |
parent | 699143aa3554fa7d417e550868f29cd014cb86f3 (diff) |
Makefile: Keep list of exported variables
This can be useful to unexport them later.
Change-Id: I2ce9eff32d817ec190441550116376843abd1c11
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/21162
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'Makefile.inc')
-rw-r--r-- | Makefile.inc | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/Makefile.inc b/Makefile.inc index ca9711d27b..88a9a63ce7 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -29,33 +29,35 @@ CONFIG_DEVICETREE:=$(call strip_quotes, $(CONFIG_DEVICETREE)) # misleadingly named, this is the coreboot version ifeq ($(KERNELVERSION),) ifeq ($(BUILD_TIMELESS),1) -export KERNELVERSION := TIMELESS +KERNELVERSION := TIMELESS else -export KERNELVERSION := $(strip $(if $(GIT),\ +KERNELVERSION := $(strip $(if $(GIT),\ $(shell git describe --dirty --always || git describe),\ $(if $(wildcard $(top)/.coreboot-version),\ $(shell cat $(top)/.coreboot-version),\ coreboot-unknown$(KERNELREVISION)))) endif endif +COREBOOT_EXPORTS += KERNELVERSION ####################################################################### # Basic component discovery MAINBOARDDIR=$(call strip_quotes,$(CONFIG_MAINBOARD_DIR)) VARIANT_DIR:=$(call strip_quotes,$(CONFIG_VARIANT_DIR)) -export MAINBOARDDIR -export VARIANT_DIR +COREBOOT_EXPORTS += MAINBOARDDIR VARIANT_DIR ## Final build results, which CBFSTOOL uses to create the final ## rom image file, are placed under $(objcbfs). ## These typically have suffixes .debug .elf .bin and .map -export objcbfs := $(obj)/cbfs/$(CONFIG_CBFS_PREFIX) +objcbfs := $(obj)/cbfs/$(CONFIG_CBFS_PREFIX) +COREBOOT_EXPORTS += objcbfs ## Based on the active configuration, Makefile conditionally collects ## the required assembly includes and saves them in a file. ## Such files that do not have a clear one-to-one relation to a source ## file under src/ are placed and built under $(objgenerated) -export objgenerated := $(obj)/generated +objgenerated := $(obj)/generated +COREBOOT_EXPORTS += objgenerated ####################################################################### # root rule to resolve if in build mode (ie. configuration exists) @@ -195,7 +197,8 @@ ifeq ($(CONFIG_USE_BLOBS),y) # unless explicitly requested and enabled through --checkout forgetthis:=$(if $(GIT),$(shell git submodule update --init --checkout 3rdparty/blobs)) endif -export UPDATED_SUBMODULES:=1 +UPDATED_SUBMODULES:=1 +COREBOOT_EXPORTS += UPDATED_SUBMODULES endif postcar-c-deps:=$$(OPTION_TABLE_H) @@ -347,7 +350,8 @@ CBFS_PRERAM_COMPRESS_FLAG:=LZ4 endif ifneq ($(CONFIG_LOCALVERSION),"") -export COREBOOT_EXTRA_VERSION := -$(call strip_quotes,$(CONFIG_LOCALVERSION)) +COREBOOT_EXTRA_VERSION := -$(call strip_quotes,$(CONFIG_LOCALVERSION)) +COREBOOT_EXPORTS += COREBOOT_EXTRA_VERSION endif CPPFLAGS_common := -Isrc -Isrc/include -Isrc/commonlib/include -I$(obj) @@ -437,6 +441,8 @@ additional-dirs := $(objutil)/cbfstool $(objutil)/romcc $(objutil)/ifdtool \ $(objutil)/ifdfake $(objutil)/options $(objutil)/amdfwtool \ $(objutil)/cbootimage $(objutil)/bimgtool +export $(COREBOOT_EXPORTS) + ####################################################################### # generate build support files $(obj)/build.h: .xcompile |