From 0cc97f0fa1e6d52c7b56412052db9d013c427c6b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 12 Oct 2006 11:45:25 +0000 Subject: [PATCH] Handle mismatch between latest gettext release and current gnulib. --- ChangeLog | 7 +++++++ gnulib-tool | 40 +++++++++++++++++++++++++++++++++++----- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 845bfee3a..ea9aa9382 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2006-10-11 Bruno Haible + * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables. + (func_create_testdir): Don't create po/Makefile.am, don't invoke + autoreconf. Instead, invoke autopoint explicitly but move back the + *.m4 files from gnulib. + +2006-10-11 Bruno Haible + * gnulib-tool (func_usage): Make module names after --create-testdir optional. (func_create_testdir): If no module was specified, use nearly all diff --git a/gnulib-tool b/gnulib-tool index b4b16711c..6e7ad0997 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -22,7 +22,7 @@ progname=$0 package=gnulib -cvsdatestamp='$Date: 2006-10-12 11:43:46 $' +cvsdatestamp='$Date: 2006-10-12 11:45:25 $' last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'` version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'` nl=' @@ -40,11 +40,17 @@ AUTOCONFPATH= # You can set AUTOMAKEPATH to empty if automake 1.9.x is already in your PATH. AUTOMAKEPATH= +# You can set GETTEXTPATH to empty if autopoint 0.15 is already in your PATH. +GETTEXTPATH= + # If you didn't set AUTOCONFPATH and AUTOMAKEPATH, you can also set the -# variables AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF individually. +# variables AUTOCONF, AUTOHEADER, ACLOCAL, AUTOMAKE, AUTORECONF individually. if test -z "${AUTOCONF}" || test -n "${AUTOCONFPATH}"; then AUTOCONF="${AUTOCONFPATH}autoconf" fi +if test -z "${AUTOHEADER}" || test -n "${AUTOCONFPATH}"; then + AUTOHEADER="${AUTOCONFPATH}autoheader" +fi if test -z "${ACLOCAL}" || test -n "${AUTOMAKEPATH}"; then ACLOCAL="${AUTOMAKEPATH}aclocal" fi @@ -55,6 +61,11 @@ if test -z "${AUTORECONF}" || test -n "${AUTOCONFPATH}"; then AUTORECONF="${AUTOCONFPATH}autoreconf" fi +# If you didn't set GETTEXTPATH, you can also set the variable AUTOPOINT. +if test -z "${AUTOPOINT}" || test -n "${GETTEXTPATH}"; then + AUTOPOINT="${GETTEXTPATH}autopoint" +fi + # GNU sort is needed. Set SORT to its location (not needed if it's called # 'sort' and already in the PATH). if test -z "$SORT"; then @@ -2145,7 +2156,7 @@ func_create_testdir () subdirs="$sourcebase $m4base" subdirs_with_configure_ac="" - if test -f "$testdir"/$m4base/gettext.m4; then + if false && test -f "$testdir"/$m4base/gettext.m4; then # Avoid stupid error message from automake: # "AM_GNU_GETTEXT used but `po' not in SUBDIRS" mkdir -p "$testdir/po" @@ -2357,8 +2368,27 @@ func_create_testdir () # Create autogenerated files. (cd "$testdir" - echo "executing ${AUTORECONF} --force --install" - ${AUTORECONF} --force --install + # Do not use "${AUTORECONF} --force --install", because it may invoke + # autopoint, which brings in older versions of some of our .m4 files. + if test -f $m4base/gettext.m4; then + echo "executing ${AUTOPOINT} --force" + ${AUTOPOINT} --force + for f in $m4base/*.m4~; do + mv $f `echo $f | sed -e 's,~$,,'` + done + fi + echo "executing ${ACLOCAL} --force -I $m4base" + ${ACLOCAL} --force -I $m4base + if ! test -d build-aux; then + echo "executing mkdir build-aux" + mkdir build-aux + fi + echo "executing ${AUTOCONF} --force" + ${AUTOCONF} --force + echo "executing ${AUTOHEADER} --force" + ${AUTOHEADER} --force + echo "executing ${AUTOMAKE} --add-missing --copy --force-missing" + ${AUTOMAKE} --add-missing --copy --force-missing ) if grep '^BUILT_SOURCES *+=' "$testdir/$sourcebase/Makefile.am" > /dev/null; then (cd "$testdir" -- 2.11.0