[coreboot-gerrit] New patch to review for coreboot: 582e191 build: turn .xcompile into a Makefile target

Daniele Forsi (dforsi@gmail.com) gerrit at coreboot.org
Tue Jul 15 10:54:26 CEST 2014


Daniele Forsi (dforsi at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6275

-gerrit

commit 582e1916a106b1f3fc10f64383eaa339442bcffe
Author: Daniele Forsi <dforsi at gmail.com>
Date:   Mon Jul 14 22:27:38 2014 +0200

    build: turn .xcompile into a Makefile target
    
    This gives better error messages if util/xcompile/xcompile fails, eg.
    if iasl is missing:
    Makefile:33: .xcompile: No such file or directory
    ERROR: no iasl found
    Makefile:254: recipe for target '.xcompile' failed
    make: *** [.xcompile] Error 1
    
    This works because if any included makefile is missing, GNU make will
    print a warning and it will rebuild it if a rule exists, else it will
    error out, see "Including Other Makefiles" in the manual:
    https://www.gnu.org/software/make/manual/make.html#Include
    In this case the warning at Makefile:33 is printed only when make is
    run in a clean tree, but .xcompile is rebuilt every time (like before)
    because make always tries to create/update makefiles and this it is a
    .PHONY target.
    
    Change-Id: Ie33ce46e17c8e59e32234576aeb77074879fa7e7
    Signed-off-by: Daniele Forsi <dforsi at gmail.com>
---
 Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index c8cad4f..cc4e3a4 100644
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,6 @@
 ## SUCH DAMAGE.
 ##
 
-$(if $(wildcard .xcompile),,$(eval $(shell bash util/xcompile/xcompile $(XGCCPATH) > .xcompile)))
 include .xcompile
 
 export top := $(CURDIR)
@@ -251,6 +250,9 @@ endif
 cscope:
 	cscope -bR
 
+.xcompile: util/xcompile/xcompile
+	bash util/xcompile/xcompile $(XGCCPATH) > .xcompile
+
 doxy: doxygen
 doxygen:
 	$(DOXYGEN) documentation/Doxyfile.coreboot



More information about the coreboot-gerrit mailing list