summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-12-16 14:41:02 +0100
committerWolfgang Denk <wd@denx.de>2008-12-16 14:41:02 +0100
commit4a0f7538c5c0805fd9a791967bbabacc41deadd9 (patch)
treef0a967b9fd1de936b352e96d359664462ab7e782 /Makefile
parent455ae7e87f67c44e6aea68865c83acadd3fcd36c (diff)
downloadbootable_bootloader_goldelico_gta04-4a0f7538c5c0805fd9a791967bbabacc41deadd9.zip
bootable_bootloader_goldelico_gta04-4a0f7538c5c0805fd9a791967bbabacc41deadd9.tar.gz
bootable_bootloader_goldelico_gta04-4a0f7538c5c0805fd9a791967bbabacc41deadd9.tar.bz2
Makefile: fix dependency problem with parallel builds
Parallel builds (using "make -jN") would occasionally fail with error messages like include/autoconf.mk:212: *** missing separator. Stop. Line numbers and affected boards were changing. Obviously some Makefiles included autoconf.mk while it was still being written to. As a fix, we now write to a temporary file first and then rename it, so that it is really ready to use as soon as it appears. Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d6cd91a..1fd03a0 100644
--- a/Makefile
+++ b/Makefile
@@ -463,7 +463,8 @@ $(obj)include/autoconf.mk: $(obj)include/config.h
set -e ; \
: Extract the config macros ; \
$(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM include/common.h | \
- sed -n -f tools/scripts/define2mk.sed > $@
+ sed -n -f tools/scripts/define2mk.sed > $@.tmp && \
+ mv $@.tmp $@
sinclude $(obj)include/autoconf.mk.dep