+ 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
+ # Need to run configure and make once, to create built files that are to be
+ # distributed (such as getdate.c).
+ # Extract the value of "CLEANFILES += ...".
+ cleaned_files=`sed -e "$sed_remove_backslash_newline" < "$testdir/$sourcebase/Makefile.am" \
+ | sed -n -e 's,^CLEANFILES[ ]*+=\([^#]*\).*$,\1,p'`
+ cleaned_files=" "`for file in $cleaned_files; do echo "$file"; done`" "
+ # Extract the value of "BUILT_SOURCES += ...". Remove variable references
+ # such $(FOO_H) because they don't refer to distributed files.
+ sed_remove_make_variables='s,[$]([A-Za-z0-9_]*),,g'
+ built_sources=`sed -e "$sed_remove_backslash_newline" < "$testdir/$sourcebase/Makefile.am" \
+ | sed -n -e 's,^BUILT_SOURCES[ ]*+=\([^#]*\).*$,\1,p' \
+ | sed -e "$sed_remove_make_variables"`
+ distributed_built_sources=`for file in $built_sources; do
+ case "$cleaned_files" in
+ *" "$file" "*) ;;
+ *) echo $file ;;
+ esac;
+ done`
+ if test -n "$distributed_built_sources"; then