]> arthur.barton.de Git - bup.git/commitdiff
Makefile: fix -j race to create ./bup 0.27-rc3
authorRob Browning <rlb@defaultvalue.org>
Sat, 14 Mar 2015 15:39:19 +0000 (10:39 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sat, 14 Mar 2015 15:42:46 +0000 (10:42 -0500)
Previously the bup target might fail if it was run in parallel
(i.e. during make -j).  Since bup depends on _version.py, which is
phony, that wasn't unlikely.

Fix the race by ignoring errors while creating the symlink, and then
testing for existence afterward.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Makefile

index a024dbeef1135db8e47f7b5e8c0522847d5b7ebd..181d42c1aebd7e528bd1c10a331b8994f6e8ae3e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,8 @@ all: bup Documentation/all
        t/configure-sampledata --setup
 
 bup: lib/bup/_version.py lib/bup/_helpers$(SOEXT) cmds main.py
-       ln -sf main.py bup
+       -ln -s main.py bup
+       test -L bup
 
 Documentation/all: bup