[coreboot-gerrit] Change in coreboot[master]: Makefile: Write .xcompile to $(obj)

Raul Rangel (Code Review) gerrit at coreboot.org
Wed Aug 15 19:14:17 CEST 2018


Raul Rangel has uploaded this change for review. ( https://review.coreboot.org/28101


Change subject: Makefile: Write .xcompile to $(obj)
......................................................................

Makefile: Write .xcompile to $(obj)

This file was being written to the root src directory. It is the only
file being written to src while all others are being written to obj. I
decided to leave .xcompile in the cleanup targets so any stale compies
will get removed on clean.

This is part of my incremental rebuild work. It saves a few targets from
being rebuilt.

BUG=b:112267918
TEST=ran emerge-grunt coreboot

Change-Id: Ia83f234447b977efa824751c9674154b77d606b0
Signed-off-by: Raul E Rangel <rrangel at chromium.org>
---
M Makefile
M Makefile.inc
2 files changed, 5 insertions(+), 5 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/28101/1

diff --git a/Makefile b/Makefile
index 1d4a488..ad4609d 100644
--- a/Makefile
+++ b/Makefile
@@ -142,18 +142,18 @@
 
 # in addition to the dependency below, create the file if it doesn't exist
 # to silence stupid warnings about a file that would be generated anyway.
-$(if $(wildcard .xcompile)$(NOCOMPILE),,$(eval $(shell util/xcompile/xcompile $(XGCCPATH) > .xcompile || rm -f .xcompile)))
+ $(if $(wildcard $(obj)/.xcompile)$(NOCOMPILE),,$(eval $(shell util/xcompile/xcompile $(XGCCPATH) > $(obj)/.xcompile || rm -f $(obj)/.xcompile)))
 
-.xcompile: util/xcompile/xcompile
+$(obj)/.xcompile: util/xcompile/xcompile
 	rm -f $@
 	$< $(XGCCPATH) > $@.tmp
 	\mv -f $@.tmp $@ 2> /dev/null
 	rm -f $@.tmp
 
--include .xcompile
+-include $(obj)/.xcompile
 
 ifneq ($(XCOMPILE_COMPLETE),1)
-$(shell rm -f .xcompile)
+$(shell rm -f $(obj)/.xcompile)
 $(error .xcompile deleted because it's invalid. \
 	Restarting the build should fix that, or explain the problem)
 endif
diff --git a/Makefile.inc b/Makefile.inc
index 7ce2360..6d60b6c 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -464,7 +464,7 @@
 
 #######################################################################
 # generate build support files
-$(obj)/build.h: .xcompile
+$(obj)/build.h: $(obj)/.xcompile
 	@printf "    GEN        build.h\n"
 	rm -f $(obj)/build.h
 	util/genbuild_h/genbuild_h.sh > $(obj)/build.ht

-- 
To view, visit https://review.coreboot.org/28101
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: Ia83f234447b977efa824751c9674154b77d606b0
Gerrit-Change-Number: 28101
Gerrit-PatchSet: 1
Gerrit-Owner: Raul Rangel <rrangel at chromium.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180815/743c3b22/attachment.html>


More information about the coreboot-gerrit mailing list