abuild: Avoid race condition when running abuild parallely
authorPatrick Georgi <patrick@georgi-clan.de>
Sat, 5 Nov 2011 11:47:13 +0000 (12:47 +0100)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Sun, 6 Nov 2011 17:21:40 +0000 (18:21 +0100)
By moving the just-created file away, parallel runs of abuild might break.

Change-Id: I03368f00e9b11dad4c80d41279970e28debc7ed5
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/405
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
util/abuild/abuild

index 0ed295ff1826319c6d87172d731d3194041ff156..ba144aabd5bade857992394590540d489a422c05 100755 (executable)
@@ -289,7 +289,7 @@ function compile_target
        eval $MAKE $silent -j $cpus DOTCONFIG=${build_dir}/config.build obj=${build_dir} objutil=$TARGET/sharedutils \
                &> ${build_dir}/make.log
        ret=$?
-       mv .xcompile ${build_dir}/xcompile.build
+       cp .xcompile ${build_dir}/xcompile.build
        cd $TARGET/${VENDOR}_${MAINBOARD}
 
        etime=`perl -e 'print time();' 2>/dev/null || date +%s`