diff --git a/.cvsignore b/.cvsignore index ebb3bf39..0b6c8ec8 100644 --- a/.cvsignore +++ b/.cvsignore @@ -17,3 +17,4 @@ gnulib install-sh link-warning.h gnulib-cvs +tests diff --git a/ChangeLog b/ChangeLog index 48cf2018..68f61188 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2007-03-03 James Youngman + * import-gnulib.sh: Pass --with-tests to gnulib-tool so that relevant + gnulib unit tests are built and are run for "make check". + + * configure.in (AC_CONFIG_FILES): Add tests/Makefile (the makefile + for the gnulib unit tests). + + * Makefile.am: Add 'tests' to SUBDIRS. + + * .cvsignore: Add 'tests'. + * import-gnulib.config (modules): Also use Gnulib modules mbscasestr and mbsstr in order to perform correct string searching in multibyte strings, in order to fix Savannah bug #14535. diff --git a/Makefile.am b/Makefile.am index f1eb84bd..b8386613 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,8 @@ AUTOMAKE_OPTIONS=gnits EXTRA_DIST = COPYING ChangeLog TODO install-sh config.h.in stamp-h.in \ THANKS config.rpath import-gnulib.sh import-gnulib.config -SUBDIRS = gnulib lib find xargs locate doc po m4 +# "tests" is the gnulib unit test dir. +SUBDIRS = gnulib tests lib find xargs locate doc po m4 ACLOCAL_AMFLAGS = -I gnulib/m4 -I m4 diff --git a/configure.in b/configure.in index 4429e145..9cd22bea 100644 --- a/configure.in +++ b/configure.in @@ -229,6 +229,7 @@ AC_DEFINE([FINDUTILS], 1, [Define if we are compiling GNU findutils]) AC_CONFIG_FILES(gnulib/Makefile gnulib/lib/Makefile) AC_CONFIG_FILES(m4/Makefile) AC_CONFIG_FILES([Makefile + tests/Makefile find/Makefile find/testsuite/Makefile xargs/Makefile xargs/testsuite/Makefile locate/Makefile locate/testsuite/Makefile diff --git a/import-gnulib.sh b/import-gnulib.sh index 4b65b141..a0a515a2 100755 --- a/import-gnulib.sh +++ b/import-gnulib.sh @@ -37,6 +37,8 @@ unset CDPATH configfile="./import-gnulib.config" cvsdir="gnulib-cvs" +tool="${cvsdir}"/gnulib/gnulib-tool + source $configfile if [ -z "$gnulib_version" ] @@ -91,21 +93,19 @@ fi set +x ) -set x $cvsdir/gnulib ; shift - -if test -f "$1"/gnulib-tool +if test -f "$tool" then true else - echo "$1/gnulib-tool does not exist, did you specify the right directory?" >&2 + echo "$tool does not exist, did you specify the right directory?" >&2 exit 1 fi -if test -x "$1"/gnulib-tool +if test -x "$tool" then true else - echo "$1/gnulib-tool is not executable" >&2 + echo "$tool is not executable" >&2 exit 1 fi @@ -118,11 +118,11 @@ fi mkdir gnulib -if "$1"/gnulib-tool --import --symlink --dir=. --lib=libgnulib --source-base=gnulib/lib --m4-base=gnulib/m4 $modules +if "$tool" --import --symlink --with-tests --dir=. --lib=libgnulib --source-base=gnulib/lib --m4-base=gnulib/m4 $modules then : OK else - echo "gnulib-tool failed, exiting." >&2 + echo "$tool failed, exiting." >&2 exit 1 fi @@ -132,7 +132,7 @@ for file in $extra_files; do */mdate-sh | */texinfo.tex) dest=doc;; *) dest=.;; esac - cp -fp "$1"/$file $dest || exit + cp -fp "${cvsdir}"/gnulib/"$file" "$dest" || exit done