summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2014-07-10 21:06:04 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2014-07-15 12:26:43 +0200
commit18ff4f166beef62175a81e9ffc7390d4a0ae5b64 (patch)
tree3830b75a8bc904c48d2151feb0c477b092a28525 /Makefile
parent3bb0b7230c07cb1d5b71df6976a8323c1cb41ca0 (diff)
downloadcoreboot-18ff4f166beef62175a81e9ffc7390d4a0ae5b64.tar.gz
coreboot-18ff4f166beef62175a81e9ffc7390d4a0ae5b64.tar.bz2
coreboot-18ff4f166beef62175a81e9ffc7390d4a0ae5b64.zip
build system: create .xcompile dependency
It's probably safe to say that .xcompile needs an update if util/xcompile/xcompile changed, so tell make about this dependency. Updates are honored immediately due to GNU make's feature of reinterpreting everything when an included file changes. See "How Makefiles Are Remade" in the GNU make documentation for details. Change-Id: Ide2f028eaddcee66028c6403688cc83e1622fa6b Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/6255 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index c8cad4fab3a1..fad810367328 100644
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,9 @@
## SUCH DAMAGE.
##
-$(if $(wildcard .xcompile),,$(eval $(shell bash util/xcompile/xcompile $(XGCCPATH) > .xcompile)))
+.xcompile: util/xcompile/xcompile
+ A=`mktemp $@.XXXXXX`; $< $(XGCCPATH) > $$A && mv $$A $@ 2> /dev/null
+
include .xcompile
export top := $(CURDIR)
@@ -271,4 +273,4 @@ clean-cscope:
distclean: clean
rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig* .ccwrap .xcompile
-.PHONY: $(PHONY) clean clean-for-update clean-cscope cscope distclean doxygen doxy .xcompile
+.PHONY: $(PHONY) clean clean-for-update clean-cscope cscope distclean doxygen doxy