automake-patches
[Top][All Lists]
Advanced

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

[PATCH 05/32] build: auxiliary testsuite files/scripts built by "make al


From: Stefano Lattarini
Subject: [PATCH 05/32] build: auxiliary testsuite files/scripts built by "make all"
Date: Thu, 26 Jul 2012 14:04:31 +0200

This will allow the developers to run a tests case by hand out of
a newly extracted tarball simply doing:

    $ ./configure && make
    $ ./runtest t/the-test-case.sh

while before this change one has to resort to:

    $ ./configure && make && make check TESTS=
    $ ./runtest t/the-test-case.sh

or, with some non-GNU makes, even:

    $ ./configure && make && make check TESTS= AM_MAKEFLAGS="TESTS="
    $ ./runtest t/the-test-case.sh

This come very handy sometimes, especially when doing one-shot
debugging.  Admittedly not a big deal, but one less friction in
the build system is always nice.

* Makefile.am (check_SCRIPTS, dist_check_DATA, nodist_check_DATA):
Move their content to ...
(noinst_SCRIPTS, dist_noinst_DATA, nodist_noinst_DATA): ... these
variables.
Adjust comments.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 Makefile.am | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index a472ff4..6b6e938 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -379,13 +379,19 @@ EXTRA_DIST += gen-testsuite-part
 $(generated_TESTS): $(srcdir)/gen-testsuite-part
 $(srcdir)/t/testsuite-part.am: $(srcdir)/gen-testsuite-part Makefile.am
 
-# Static dependencies valid for each test case.
-check_SCRIPTS = t/wrap/aclocal-$(APIVERSION) t/wrap/automake-$(APIVERSION)
-dist_check_DATA = \
-  t/ax/test-init.sh  \
-  t/ax/plain-functions.sh  \
+# Static dependencies valid for each test case (also further
+# extended later).  Note that use 'noinst_' rather than 'check_'
+# as the prefix, because we really want them to be built by
+# "make all".  This makes it easier to run the test cases by
+# hand after having simply configured and built the package.
+
+nodist_noinst_SCRIPTS = \
+  t/wrap/aclocal-$(APIVERSION) \
+  t/wrap/automake-$(APIVERSION)
+dist_noinst_DATA = \
+  t/ax/test-init.sh \
+  t/ax/plain-functions.sh \
   t/ax/tap-functions.sh
-nodist_check_DATA = defs-static
 
 # Few more static dependencies.
 t/distcheck-missing-m4.log: t/ax/distcheck-hook-m4.am
@@ -399,6 +405,7 @@ defs-static: defs-static.in Makefile
        $(generated_file_finalize)
 EXTRA_DIST += defs-static.in
 CLEANFILES += defs-static
+nodist_noinst_DATA = defs-static
 
 runtest: runtest.in Makefile
        $(AM_V_at)rm -f $@ address@hidden
@@ -551,7 +558,7 @@ amhello_configury = \
   missing \
   src/Makefile.in
 
-dist_noinst_DATA = $(amhello_sources)
+dist_noinst_DATA += $(amhello_sources)
 dist_doc_DATA = $(srcdir)/doc/amhello-1.0.tar.gz
 
 # We depend on configure.ac so that we regenerate the tarball
-- 
1.7.12.rc0




reply via email to

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