Bernhard Voelker wrote: > is the transition to a recursive build system finished?
Thank you. You've raised some good points. We'll need to adjust the documentation, at least. Do you feel like doing that? (no need, I think. see below) I am not inclined to convert the final directory, gnulib-tests/, so as far as I'm concerned, it's finished for now. I still need to add mention of it in NEWS. > Some test-related things don't seem to be refurbished yet (although some > of the following cases also didn't work with the old build system): > > a. 'make' in the 'tests' directory fails: No longer supported. If you want to avoid running gnulib-tests, do this: make check SUBDIRS=. > b. 'make check' in the tests directory fails: No longer supported. See above. > c. 'make check' of a certain test as proposed in README fails (related to b.): > > ~/coreutils> (cd tests && make check TESTS=misc/df VERBOSE=yes) > make: *** No rule to make target `Makefile.am', needed by `Makefile.in'. > Stop. The new incantation is this: (note the new "tests/" prefix) make check TESTS=tests/df/header.sh SUBDIRS=. > d. 'make check' of a certain test fails: Use the syntax shown above. ... > e. 'make check' of a certain test subsequently fails in gnulib-tests: ... The SUBDIRS=. part excludes gnulib-tests/ Hey! Here's an even better idea: >From 37b8e474bc1f750ad9a503474c66220b400d0e54 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyer...@redhat.com> Date: Fri, 14 Sep 2012 09:25:33 +0200 Subject: [PATCH] tests: reenable "make -C tests ..." commands The README-documented way to run individual tests was invalidated by the conversion of tests/ to non-recursive make. Add a GNUmakefile shim to reenable that usage. * tests/GNUmakefile: New file, so that "make -C tests ..." works like it did before the conversion of tests/ to non-recursive build. Reported by Bernhard Voelker. * Makefile.am (EXTRA_DIST): Add it. --- Makefile.am | 1 + tests/GNUmakefile | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 tests/GNUmakefile diff --git a/Makefile.am b/Makefile.am index dfbb591..0232090 100644 --- a/Makefile.am +++ b/Makefile.am @@ -53,6 +53,7 @@ EXTRA_DIST = \ cfg.mk \ dist-check.mk \ maint.mk \ + tests/GNUmakefile \ thanks-gen gen_progs_lists = $(top_srcdir)/build-aux/gen-lists-of-programs.sh diff --git a/tests/GNUmakefile b/tests/GNUmakefile new file mode 100644 index 0000000..3c178a2 --- /dev/null +++ b/tests/GNUmakefile @@ -0,0 +1,20 @@ +# Provide a compatibility layer so that the commands used before the +# conversion of tests/ to non-recursive make still work. To do that, we +# must rerun the "make check" from the parent, and with tests/ prefixed +# onto any TESTS values. The SUBDIRS=. is to prevent the top-level check +# rules from descending into e.g., gnulib-test/. + +.PHONY: all +all: + @echo 'tests/GNUmakefile: did you mean to make "check"?' 1>&2 + @exit 1 + +ifeq ($(TESTS),) +tests = +else +tests = TESTS=$(addprefix tests/,$(TESTS)) +endif + +.PHONY: check +check: + cd .. && $(MAKE) $@ $(tests) SUBDIRS=. -- 1.7.12.363.g53284de