summaryrefslogtreecommitdiff
path: root/tests/GNUmakefile
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-09-14 09:25:33 +0200
committerJim Meyering <meyering@redhat.com>2012-09-14 10:20:03 +0200
commit0b4abe7b42a8236f9d75c4e6f9ddb30111b63990 (patch)
tree55ff916726bf807506505105b5a4415d4446a3d9 /tests/GNUmakefile
parent8d4924f10792cd443efafe8405f70a75d66cd9d5 (diff)
downloadcoreutils-0b4abe7b42a8236f9d75c4e6f9ddb30111b63990.tar.xz
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. * cfg.mk (sc_prohibit_tab_based_indentation): Also exempt any GNUmakefile from this syntax-check.
Diffstat (limited to 'tests/GNUmakefile')
-rw-r--r--tests/GNUmakefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/GNUmakefile b/tests/GNUmakefile
new file mode 100644
index 000000000..3c178a2c8
--- /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=.