[coreboot-gerrit] New patch to review for coreboot: 8789806 make: avoid problems with mv aliases
Vadim Bendebury (vbendeb@chromium.org)
gerrit at coreboot.org
Sat Apr 25 21:06:15 CEST 2015
Vadim Bendebury (vbendeb at chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9994
-gerrit
commit 87898064ba578bba58da5854988ec26c77f97f9c
Author: Vadim Bendebury <vbendeb at chromium.org>
Date: Sat Apr 25 11:34:35 2015 -0700
make: avoid problems with mv aliases
Make fails to update .xcompile in case there is an mv alias preventing
silent overwrites of existing files. To avoid ambiguity, invoke mv
from standard location.
While we are at it, also simplify the rule for .xcompile generation:
there is no really need to create a special temporary file, using a
file name extension works just fine in this case.
There is also no need to use shell '&&' operator - make is intelligent
enough to stop building on the first encountered error.
Tested by touching util/xcompile/xcompile and/or running 'make
oldconfig' a few times. .xcompile gets properly regenerated when
required.
Change-Id: Iedc5e288fbcc5dfc18ce39de5c067bb869a13275
Signed-off-by: Vadim Bendebury <vbendeb at chromium.org>
---
Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 3c57608..25aaade 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,8 @@
$(if $(wildcard .xcompile),,$(eval $(shell util/xcompile/xcompile $(XGCCPATH) > .xcompile)))
.xcompile: util/xcompile/xcompile
- A=`mktemp $@.XXXXXX`; $< $(XGCCPATH) > $$A && mv $$A $@ 2> /dev/null
+ $< $(XGCCPATH) > $@.tmp
+ /bin/mv -f $@.tmp $@ 2> /dev/null
include .xcompile
More information about the coreboot-gerrit
mailing list