Enable gnulib-tool's --with-tests option.
authorJim Meyering <meyering@redhat.com>
Sat, 10 Nov 2007 17:33:07 +0000 (18:33 +0100)
committerJim Meyering <meyering@redhat.com>
Wed, 14 Nov 2007 19:35:34 +0000 (20:35 +0100)
* bootstrap: After all is done, transform the generated gnulib-tests/gnulib.mk.
* bootstrap.conf (gnulib_tool_option_extras): Set it here.
* gnulib-tests/Makefile.am: New file.
* Makefile.am (SUBDIRS): Add gnulib-tests.
* configure.ac (AC_CONFIG_FILES): Add gnulib-tests/Makefile.
* m4/jm-macros.m4 (coreutils_MACROS) [ARGMATCH_DIE_DECL]: Omit the
"extern " prefix to "void usage ()", so that the macro string value can
be used to construct a function definition in gnulib's test-argmatch.c.

ChangeLog
Makefile.am
bootstrap
bootstrap.conf
configure.ac
gnulib-tests/Makefile.am [new file with mode: 0644]
m4/jm-macros.m4

index 0dc025a..7f78c14 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2007-11-14  Jim Meyering  <meyering@redhat.com>
+
+       Enable gnulib-tool's --with-tests option.
+       * bootstrap: After all is done, transform the generated
+       gnulib-tests/gnulib.mk.
+       * bootstrap.conf (gnulib_tool_option_extras): Set it here.
+       * gnulib-tests/Makefile.am: New file.
+       * Makefile.am (SUBDIRS): Add gnulib-tests.
+       * configure.ac (AC_CONFIG_FILES): Add gnulib-tests/Makefile.
+       * m4/jm-macros.m4 (coreutils_MACROS) [ARGMATCH_DIE_DECL]: Omit the
+       "extern " prefix to "void usage ()", so that the macro string value can
+       be used to construct a function definition in gnulib's test-argmatch.c.
+
 2007-11-12  Benno Schulenberg  <bensberg@justemail.net>
 
        Clarify description of cp's -a option.
index 7ff2e0b..5f9f21a 100644 (file)
@@ -15,7 +15,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-SUBDIRS = lib src doc man po tests
+SUBDIRS = lib src doc man po tests gnulib-tests
 EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
   .prev-version THANKS-to-translators THANKStt.in \
   .vg-suppressions \
index 1eec10f..b1d17a3 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -598,4 +598,10 @@ if test $with_gettext = yes; then
   fi
 fi
 
+# Horrible, coreutils-specific kludge.
+# Change paths in gnulib-tests/gnulib.mk from "../.." to "..".
+m=gnulib-tests/gnulib.mk
+sed 's,\.\./\.\.,..,g' $m > $m-t
+mv -f $m-t $m
+
 echo "$0: done.  Now you can run './configure'."
index 291e8a4..5ffd466 100644 (file)
@@ -135,3 +135,5 @@ if test $gettext_external = 1; then
       m4/visibility.m4
   '
 fi
+
+gnulib_tool_option_extras="--tests-base=$bt/gnulib-tests --with-tests"
index 7cc7493..6d996de 100644 (file)
@@ -336,6 +336,7 @@ AC_CONFIG_FILES(
   po/Makefile.in
   src/Makefile
   tests/Makefile
+  gnulib-tests/Makefile
   tests/chgrp/Makefile
   tests/chmod/Makefile
   tests/chown/Makefile
diff --git a/gnulib-tests/Makefile.am b/gnulib-tests/Makefile.am
new file mode 100644 (file)
index 0000000..6635f70
--- /dev/null
@@ -0,0 +1 @@
+include gnulib.mk
index 416cc9c..5a92d4a 100644 (file)
@@ -1,4 +1,4 @@
-#serial 105   -*- autoconf -*-
+#serial 106   -*- autoconf -*-
 
 dnl Misc type-related macros for coreutils.
 
@@ -38,7 +38,7 @@ AC_DEFUN([coreutils_MACROS],
   # By default, argmatch should fail calling usage (1).
   AC_DEFINE(ARGMATCH_DIE, [usage (1)],
            [Define to the function xargmatch calls on failures.])
-  AC_DEFINE(ARGMATCH_DIE_DECL, [extern void usage ()],
+  AC_DEFINE(ARGMATCH_DIE_DECL, [void usage ()],
            [Define to the declaration of the xargmatch failure function.])
 
   # used by ls