]> arthur.barton.de Git - bup.git/commitdiff
Don't have ./bup depend on main.py, etc.
authorRob Browning <rlb@defaultvalue.org>
Sat, 21 Mar 2015 19:40:48 +0000 (14:40 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sat, 21 Mar 2015 20:23:30 +0000 (15:23 -0500)
Instead create bup_deps (which includes bup) and have everything that
needs a functional ./bup depend on that set of targets.

Previously bup would often be rebuilt unnecessarily (even if it didn't
depend on other phony targets) because it depended on _version.py and
main.py.  Since bup ends up symlinked to the latter, and make looks at
symlink target timestamps, and _version.py would often be newer than
main.py, ./bup would be repeatedly rebuilt.

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

index 181d42c1aebd7e528bd1c10a331b8994f6e8ae3e..ffb46273dc02bf404f441d32eefce8e70fc81852 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,15 +13,16 @@ else
   test_tmp := $(CURDIR)/t/tmp
 endif
 
+bup_deps := bup lib/bup/_version.py lib/bup/_helpers$(SOEXT) cmds
+
 .PHONY: all
-all: bup Documentation/all
+all: $(bup_deps) Documentation/all
        t/configure-sampledata --setup
 
-bup: lib/bup/_version.py lib/bup/_helpers$(SOEXT) cmds main.py
-       -ln -s main.py bup
-       test -L bup
+bup:
+       ln -s main.py bup
 
-Documentation/all: bup
+Documentation/all: $(bup_deps)
 
 INSTALL=install
 PYTHON=python