From e46960246139fbf53e34de9288e654da900db63b Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Sat, 25 Apr 2015 11:34:35 -0700 Subject: 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, drop the code creating a unique .xcompile instance before copying it into destination: this was done for the case of running multiple independent make processes in parallel, but there is a problem with this approach with multiple processes copying their unique copies into the same destination file. The tool running multiple make invocations in parallel should explicitly invoke xcompile first. Change-Id: Iedc5e288fbcc5dfc18ce39de5c067bb869a13275 Signed-off-by: Vadim Bendebury Reviewed-on: http://review.coreboot.org/9994 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 14e159898c..2ff4ebe045 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 + \mv -f $@.tmp $@ 2> /dev/null include .xcompile -- cgit v1.2.3