progname=$0
package=gnulib
-cvsdatestamp='$Date: 2006-11-06 13:04:37 $'
+cvsdatestamp='$Date: 2006-11-12 09:53:16 $'
last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
nl='
# expansion total).
echo "AC_DEFUN([gl_INIT], ["
func_emit_initmacro_start
- if test "$auxdir" != "build-aux"; then
- sed_replace_build_aux='
- :a
- /AC_CONFIG_FILES(.*:build-aux\/.*)/{
- s|AC_CONFIG_FILES(\(.*\):build-aux/\(.*\))|AC_CONFIG_FILES(\1:../'"$auxdir"'/\2)|
- ba
- }'
- sed_replace_build_aux=`echo "$sed_replace_build_aux" | sed -e 1d -e 's/^ *//'`
- else
- sed_replace_build_aux=
- fi
+ sed_replace_build_aux='
+ :a
+ /AC_CONFIG_FILES(.*:build-aux\/.*)/{
+ s|AC_CONFIG_FILES(\(.*\):build-aux/\(.*\))|AC_CONFIG_FILES(\1:../'"$auxdir"'/\2)|
+ ba
+ }'
+ sed_replace_build_aux=`echo "$sed_replace_build_aux" | sed -e 1d -e 's/^ *//'`
# We don't have explicit ordering constraints between the various
# autoconf snippets. It's cleanest to put those of the library before
# those of the tests.
# 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
+ ${AUTOPOINT} --force || func_exit 1
for f in $m4base/*.m4~; do
- mv $f `echo $f | sed -e 's,~$,,'`
+ mv -f $f `echo $f | sed -e 's,~$,,'` || func_exit 1
done
fi
- echo "executing ${ACLOCAL} --force -I $m4base"
- ${ACLOCAL} --force -I $m4base
+ echo "executing ${ACLOCAL} -I $m4base"
+ ${ACLOCAL} -I $m4base || func_exit 1
if ! test -d build-aux; then
echo "executing mkdir build-aux"
- mkdir build-aux
+ mkdir build-aux || func_exit 1
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
- )
+ echo "executing ${AUTOCONF}"
+ ${AUTOCONF} || func_exit 1
+ echo "executing ${AUTOHEADER}"
+ ${AUTOHEADER} || func_exit 1
+ echo "executing ${AUTOMAKE} --add-missing --copy"
+ ${AUTOMAKE} --add-missing --copy || func_exit 1
+ ) || func_exit 1
+ if test -n "$inctests"; then
+ # Create autogenerated files.
+ (cd "$testdir/$testsbase" || func_exit 1
+ # 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 || func_exit 1
+ for f in ../$m4base/*.m4~; do
+ mv -f $f `echo $f | sed -e 's,~$,,'` || func_exit 1
+ done
+ fi
+ echo "executing ${ACLOCAL} -I ../$m4base"
+ ${ACLOCAL} -I ../$m4base || func_exit 1
+ if ! test -d ../build-aux; then
+ echo "executing mkdir ../build-aux"
+ mkdir ../build-aux
+ fi
+ echo "executing ${AUTOCONF}"
+ ${AUTOCONF} || func_exit 1
+ echo "executing ${AUTOHEADER}"
+ ${AUTOHEADER} || func_exit 1
+ echo "executing ${AUTOMAKE} --add-missing --copy"
+ ${AUTOMAKE} --add-missing --copy || func_exit 1
+ ) || func_exit 1
+ fi
if grep '^BUILT_SOURCES *+=' "$testdir/$sourcebase/Makefile.am" > /dev/null; then
(cd "$testdir"
- ./configure
+ ./configure || func_exit 1
cd "$sourcebase"
echo 'built_sources: $(BUILT_SOURCES)' >> Makefile
- make built_sources
+ make built_sources || func_exit 1
cd ..
- make distclean
- )
+ make distclean || func_exit 1
+ ) || func_exit 1
fi
}
# recursively, but the subdirectories are already finished, therefore
# calling autoreconf here would only waste lots of CPU time.
echo "executing ${ACLOCAL}"
- ${ACLOCAL}
+ ${ACLOCAL} || func_exit 1
echo "executing mkdir build-aux"
mkdir build-aux
echo "executing ${AUTOCONF}"
- ${AUTOCONF}
+ ${AUTOCONF} || func_exit 1
echo "executing ${AUTOMAKE} --add-missing --copy"
- ${AUTOMAKE} --add-missing --copy
- )
+ ${AUTOMAKE} --add-missing --copy || func_exit 1
+ ) || func_exit 1
}
case $mode in
cd "$destdir"
mkdir build
cd build
- ../configure
- make
- make check
- make distclean
+ ../configure || func_exit 1
+ make || func_exit 1
+ make check || func_exit 1
+ make distclean || func_exit 1
remaining=`find . -type f -print`
if test -n "$remaining"; then
echo "Remaining files:" $remaining 1>&2