X-Git-Url: https://arthur.barton.de/gitweb/?p=bup.git;a=blobdiff_plain;f=GNUmakefile;h=61d4a4c5a7c6f66145af8b8942538123661e270f;hp=f648dfb65fd7f997d561027f61d7fdeb167528c0;hb=85bc7222c34c301e3cf2672ce97641d0d72d67ad;hpb=54b0467e48d27925ca8368d1f03c6254412b2786 diff --git a/GNUmakefile b/GNUmakefile index f648dfb..61d4a4c 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -40,9 +40,9 @@ LDFLAGS ?= TARGET_ARCH ?= bup_shared_cflags := -O2 -Wall -Werror -Wformat=2 -bup_shared_cflags := -Wno-unused-command-line-argument $(bup_shared_cflags) bup_shared_cflags := -Wno-unknown-pragmas -Wsign-compare $(bup_shared_cflags) bup_shared_cflags := -D_FILE_OFFSET_BITS=64 $(bup_shared_cflags) +bup_shared_cflags := $(bup_config_cflags) $(bup_shared_cflags) bup_shared_ldflags := @@ -206,15 +206,16 @@ get_parallel_n = $(patsubst -j%,%,$(parallel_opt)) maybe_specific_n = $(if $(filter -j%,$(parallel_opt)),-n$(get_parallel_n)) xdist_opt = $(if $(filter -j,$(parallel_opt)),-nauto,$(maybe_specific_n)) -lint: dev/bup-python +lint: dev/bup-exec dev/bup-python ./pylint test: all test/tmp dev/python lint - if test yes = "$$(dev/python -c 'import xdist; print("yes")' 2>/dev/null)"; then \ + ./bup features + if test yes = "$$(dev/python -c 'import xdist; print("yes")' 2>/dev/null)"; then \ (set -x; ./pytest $(xdist_opt);) \ - else \ - (set -x; ./pytest;) \ - fi + else \ + (set -x; ./pytest;) \ + fi stupid: PATH=/bin:/usr/bin $(MAKE) test @@ -234,10 +235,14 @@ long-test: test long-check: export BUP_TEST_LEVEL=11 long-check: check -.PHONY: check-both -check-both: +.PHONY: check-py2 check-py3 check-both +check-py3: $(MAKE) clean && BUP_PYTHON_CONFIG=python3-config $(MAKE) check +check-py2: $(MAKE) clean && BUP_PYTHON_CONFIG=python2.7-config $(MAKE) check +check-both: + $(MAKE) check-py3 + $(MAKE) check-py2 .PHONY: Documentation/all Documentation/all: $(man_roff) $(man_html) @@ -251,11 +256,11 @@ Documentation/substvars: $(bup_deps) Documentation/%.1: Documentation/%.md Documentation/substvars $(pf); sed -f Documentation/substvars $< \ - | $(PANDOC) -s -r markdown -w man -o $@ + | "$(PANDOC)" -s -r markdown -w man -o $@ Documentation/%.html: Documentation/%.md Documentation/substvars $(pf); sed -f Documentation/substvars $< \ - | $(PANDOC) -s -r markdown -w html -o $@ + | "$(PANDOC)" -s -r markdown -w html -o $@ .PHONY: Documentation/clean Documentation/clean: @@ -280,11 +285,8 @@ import-docs: Documentation/clean clean: Documentation/clean cd config && rm -rf finished bin config.var - cd config && rm -f \ - ${CONFIGURE_DETRITUS} ${CONFIGURE_FILES} ${GENERATED_FILES} - rm -rf $(clean_paths) .pytest_cache - rm -f $(generated_dependencies) - find . -name __pycache__ -exec rm -rf {} + + + # Clean up the mounts first, so that find, etc. won't crash later if test -e test/mnt; then dev/cleanup-mounts-under test/mnt; fi if test -e test/mnt; then rm -r test/mnt; fi if test -e test/tmp; then dev/cleanup-mounts-under test/tmp; fi @@ -292,5 +294,11 @@ clean: Documentation/clean if test -e test/int/testfs; \ then umount test/int/testfs || true; fi rm -rf test/int/testfs test/int/testfs.img testfs.img + + cd config && rm -f \ + ${CONFIGURE_DETRITUS} ${CONFIGURE_FILES} ${GENERATED_FILES} + rm -rf $(clean_paths) .pytest_cache + rm -f $(generated_dependencies) + find . -name __pycache__ -exec rm -rf {} + if test -e test/tmp; then dev/force-delete test/tmp; fi dev/configure-sampledata --clean