[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: non-recursive make finished?

From: Jim Meyering
Subject: Re: non-recursive make finished?
Date: Fri, 14 Sep 2012 09:30:40 +0200

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 `', needed by `'.  
> Stop.

The new incantation is this:
(note the new "tests/" prefix)

    make check TESTS=tests/df/ 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 <address@hidden>
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.
* (EXTRA_DIST): Add it.
---       |  1 +
 tests/GNUmakefile | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 tests/GNUmakefile

diff --git a/ b/
index dfbb591..0232090 100644
--- a/
+++ b/
@@ -53,6 +53,7 @@ EXTRA_DIST =                          \                               \                                \                             \
+  tests/GNUmakefile                    \

 gen_progs_lists = $(top_srcdir)/build-aux/
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
+       @echo 'tests/GNUmakefile: did you mean to make "check"?' 1>&2
+       @exit 1
+ifeq ($(TESTS),)
+tests =
+tests = TESTS=$(addprefix tests/,$(TESTS))
+.PHONY: check
+       cd .. && $(MAKE) $@ $(tests) SUBDIRS=.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]