summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@secunet.com>2014-07-10 09:42:03 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2014-07-10 20:56:35 +0200
commit533c119f5b4fd7725ab3f09a0f3af7b623cc501d (patch)
tree0e633dfb97aaf2fce5e937cd2f66a97dcc42d795
parent5b9e6f175f7778b16ac988e2de4e271751ecc019 (diff)
downloadcoreboot-533c119f5b4fd7725ab3f09a0f3af7b623cc501d.tar.xz
build system: avoid more race conditions
In an abuild run, cbfstool is built in a shared directory using "make tools". Unfortunately the build system doesn't actually use that binary directly but creates a per-board copy (for convenience purposes when editing the image later) and uses that. With this change the build system uses the original file but still creates the copy for the user, avoiding the race while ensuring convenience. Change-Id: I38c603a7eca5ef859875ad3031bf7a850189645f Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com> Reviewed-on: http://review.coreboot.org/6242 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
-rw-r--r--Makefile.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 5e4c5c558d..42ed707e8d 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -57,7 +57,7 @@ export objgenerated := $(obj)/generated
#######################################################################
# root rule to resolve if in build mode (ie. configuration exists)
real-target: $(obj)/config.h coreboot
-coreboot: build-dirs $(obj)/coreboot.rom
+coreboot: build-dirs $(obj)/coreboot.rom $(obj)/cbfstool $(obj)/rmodtool
#######################################################################
# our phony targets
@@ -258,13 +258,13 @@ build-dirs:
#######################################################################
# Build the tools
-CBFSTOOL:=$(obj)/cbfstool
-RMODTOOL:=$(obj)/rmodtool
+CBFSTOOL:=$(objutil)/cbfstool/cbfstool
+RMODTOOL:=$(objutil)/cbfstool/rmodtool
-$(CBFSTOOL): $(objutil)/cbfstool/cbfstool
+$(obj)/cbfstool: $(CBFSTOOL)
cp $< $@
-$(RMODTOOL): $(objutil)/cbfstool/rmodtool
+$(obj)/rmodtool: $(RMODTOOL)
cp $< $@
_WINCHECK=$(shell uname -o 2> /dev/null)