From c369e79c60843d0c14d6a507016d347e40dcb7c0 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 10 Nov 2007 18:33:07 +0100 Subject: [PATCH] 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. --- ChangeLog | 13 +++++++++++++ Makefile.am | 2 +- bootstrap | 6 ++++++ bootstrap.conf | 2 ++ configure.ac | 1 + gnulib-tests/Makefile.am | 1 + m4/jm-macros.m4 | 4 ++-- 7 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 gnulib-tests/Makefile.am diff --git a/ChangeLog b/ChangeLog index 0dc025a1b..7f78c14b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2007-11-14 Jim Meyering + + 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 Clarify description of cp's -a option. diff --git a/Makefile.am b/Makefile.am index 7ff2e0b5c..5f9f21a72 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -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 \ diff --git a/bootstrap b/bootstrap index 1eec10f13..b1d17a33e 100755 --- 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'." diff --git a/bootstrap.conf b/bootstrap.conf index 291e8a449..5ffd4661f 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -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" diff --git a/configure.ac b/configure.ac index 7cc749356..6d996de70 100644 --- a/configure.ac +++ b/configure.ac @@ -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 index 000000000..6635f7065 --- /dev/null +++ b/gnulib-tests/Makefile.am @@ -0,0 +1 @@ +include gnulib.mk diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4 index 416cc9c2b..5a92d4a9e 100644 --- a/m4/jm-macros.m4 +++ b/m4/jm-macros.m4 @@ -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