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>
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