[coreboot-gerrit] Change in coreboot[master]: Makefile.inc: Export CCACHE_EXTRAFILES and add __BUILD_DIR__ definition
Julius Werner (Code Review)
gerrit at coreboot.org
Mon May 21 22:21:31 CEST 2018
Julius Werner has uploaded this change for review. ( https://review.coreboot.org/26451
Change subject: Makefile.inc: Export CCACHE_EXTRAFILES and add __BUILD_DIR__ definition
......................................................................
Makefile.inc: Export CCACHE_EXTRAFILES and add __BUILD_DIR__ definition
This patch adds the CCACHE_EXTRAFILES variable to the list of exported
environment variables, which can be useful as a target-specific variable
to make ccache aware of extra dependencies that it cannot figure out on
its own. It also adds a CPPFLAGS parameter to define the __BUILD_DIR__
constant for the preprocessor so that the current output build directory
can be referenced in C code if necessary.
Change-Id: I4fdd08842972cfed8ef5e5a61ebf859c0571bcfb
Signed-off-by: Julius Werner <jwerner at chromium.org>
---
M Makefile.inc
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/51/26451/1
diff --git a/Makefile.inc b/Makefile.inc
index fcdc72c..c40cec8 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -60,6 +60,10 @@
objgenerated := $(obj)/generated
COREBOOT_EXPORTS += objgenerated
+## CCACHE_EXTRAFILES can be set by individual rules to help CCACHE
+## discover dependencies it might not notice on its own (e.g. asm (".incbin")).
+COREBOOT_EXPORTS += CCACHE_EXTRAFILES
+
#######################################################################
# root rule to resolve if in build mode (ie. configuration exists)
real-target: $(obj)/config.h coreboot files_added
@@ -380,6 +384,7 @@
CPPFLAGS_common += -I$(VBOOT_SOURCE)/firmware/include
CPPFLAGS_common += -include $(src)/include/kconfig.h
CPPFLAGS_common += -I3rdparty
+CPPFLAGS_common += -D__BUILD_DIR__=\"$(obj)\"
CFLAGS_common += -pipe -g -nostdinc -std=gnu11
CFLAGS_common += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes
--
To view, visit https://review.coreboot.org/26451
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4fdd08842972cfed8ef5e5a61ebf859c0571bcfb
Gerrit-Change-Number: 26451
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner at chromium.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180521/56ca4fc3/attachment.html>
More information about the coreboot-gerrit
mailing list