+
+sampledata_rev := $(shell t/configure-sampledata --revision)
+current_sampledata := t/sampledata/var/rev/v$(sampledata_rev)
+
OS:=$(shell uname | sed 's/[-_].*//')
CFLAGS := -Wall -O2 -Werror -Wno-unknown-pragmas $(PYINCLUDE) $(CFLAGS)
CFLAGS := -D_FILE_OFFSET_BITS=64 $(CFLAGS)
test_tmp := $(CURDIR)/t/tmp
endif
-.PHONY: all
-all: bup Documentation/all
- t/configure-sampledata --setup
+initial_setup := $(shell ./configure-version --update)
+bup_deps := bup lib/bup/_version.py lib/bup/_helpers$(SOEXT) cmds
-bup: lib/bup/_version.py lib/bup/_helpers$(SOEXT) cmds main.py
- ln -sf main.py bup
+all: $(bup_deps) Documentation/all $(current_sampledata)
-Documentation/all: bup
+bup:
+ ln -s main.py bup
+
+Documentation/all: $(bup_deps)
+
+$(current_sampledata):
+ t/configure-sampledata --setup
INSTALL=install
PYTHON=python
LDFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)" $(PYTHON) csetup.py build
cp lib/bup/build/*/_helpers$(SOEXT) lib/bup/
-# This must be completely atomic since it may be run (often) in
-# parallel when "-j" is specified, either via targets here, or via
-# tests that use an install tree as data.
-.PHONY: lib/bup/_version.py
lib/bup/_version.py:
- rm -f $@.tmp-$$$$ \
- && ./format-subst.pl $@.pre > $@.tmp-$$$$ \
- && (if ! test -e $@ || ! cmp $@ $@.tmp-$$$$; then mv $@.tmp-$$$$ $@; fi)
+ @echo "Something has gone wrong; $@ should already exist."
+ @echo 'Check "./configure-version --update"'
+ @false
t/tmp:
mkdir t/tmp
t/test-save-creates-no-unrefs.sh \
t/test-save-restore-excludes.sh \
t/test-save-strip-graft.sh \
+ t/test-import-duplicity.sh \
t/test-import-rdiff-backup.sh \
t/test-xdev.sh \
t/test.sh
# For parallel runs.
-tmp-target-run-test-%: all t/tmp
- TMPDIR="$(test_tmp)" t/test-$*
+tmp-target-run-test%: all t/tmp
+ TMPDIR="$(test_tmp)" t/test$*
-runtests-cmdline: $(subst t/test-,tmp-target-run-test-,$(cmdline_tests))
+runtests-cmdline: $(subst t/test,tmp-target-run-test,$(cmdline_tests))
stupid:
PATH=/bin:/usr/bin $(MAKE) test
.*~ *~ */*~ lib/*/*~ lib/*/*/*~ \
*.pyc */*.pyc lib/*/*.pyc lib/*/*/*.pyc \
bup bup-* cmd/bup-* \
- lib/bup/_version.py lib/bup/_version.py.tmp-* \
randomgen memtest \
testfs.img lib/bup/t/testfs.img
if test -e t/mnt; then t/cleanup-mounts-under t/mnt; fi
then umount lib/bup/t/testfs || true; fi
rm -rf *.tmp *.tmp.meta t/*.tmp lib/*/*/*.tmp build lib/bup/build lib/bup/t/testfs
if test -e t/tmp; then t/force-delete t/tmp; fi
+ ./configure-version --clean
t/configure-sampledata --clean