From: Akim Demaille Date: Fri, 26 Jan 2001 11:59:49 +0000 (+0000) Subject: * tests/mktests.sh: Handle DOS issues: directory separator, single X-Git-Tag: autoconf-2.50~189 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06c179893b32c507a65b3e04bc671e76a5121a91;p=thirdparty%2Fautoconf.git * tests/mktests.sh: Handle DOS issues: directory separator, single dot in file names, and one actual bug: when set -e, running (false; true) will of course fail, use (false || true). From Tim Van Holder. --- diff --git a/ChangeLog b/ChangeLog index 47cd0d188..b7cffd016 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-01-26 Akim Demaille + + * tests/mktests.sh: Handle DOS issues: directory separator, single + dot in file names, and one actual bug: when set -e, running + (false; true) will of course fail, use (false || true). + From Tim Van Holder. + 2001-01-26 Tim Van Holder * tests/Makefile.am (testsuite): Use testsuite.tmp, not diff --git a/tests/Makefile.in b/tests/Makefile.in index fa04a0ca3..69037cc1e 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -86,7 +86,7 @@ CLEANFILES = debug-*.sh macro configure configure.in configure.ac c DISTCLEANFILES = atconfig testsuite mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = atconfig -DIST_COMMON = README Makefile.am Makefile.in atconfig.in +DIST_COMMON = README Makefile.am Makefile.in atconfig.in configure PACKAGE = @PACKAGE@ @@ -203,9 +203,9 @@ testsuite: $(top_srcdir)/m4sugar.m4 $(top_srcdir)/m4sh.m4 \ $(SUITE) $(M4) -I $(srcdir) -I $(top_srcdir) atspecific.m4 suite.at | \ sed -e 's/[ ]*$$//' | \ - sed -e '/^$$/N;/\n$$/D' > $@-tmp - chmod +x $@-tmp - mv $@-tmp $@ + sed -e '/^$$/N;/\n$$/D' >$@.tmp + chmod +x $@.tmp + mv $@.tmp $@ acgeneral.at: mktests.sh $(MACRO_FILES) cd $(srcdir) && ./mktests.sh $(MACRO_FILES) diff --git a/tests/mktests.sh b/tests/mktests.sh index e49831854..69251d591 100755 --- a/tests/mktests.sh +++ b/tests/mktests.sh @@ -22,13 +22,13 @@ # because we used some non portable tool, but we just don't care: this # shell script is a maintainer tool, and we do expect good tools. -as_me=`echo "$0" | sed 's,.*/,,'` +as_me=`echo "$0" | sed 's,.*[\\/],,'` trap 'echo "'"$as_me"': failed. To proceed run make check." >&2 - rm -f acdefuns audefuns requires $as_me.tat + rm -f acdefuns audefuns requires *.tat for file in "$@" do - touch `echo "$file" | sed "s,.*/,,;s/\..*/.at/"` + touch `echo "$file" | sed "s,.*[\\/],,;s/\..*/.at/"` done trap 0 exit 1' \ @@ -71,6 +71,7 @@ cat $src | exclude_list='^ac_cv_prog_(gcc|gxx|g77)$ ' + # ac_exclude_list # --------------- # The test `ac-macros.at' tries to run all the macros of Autoconf to check @@ -171,7 +172,7 @@ au_exclude_egrep=`echo "$exclude_list$au_exclude_list" | tr ' for file in $src do - base=`echo "$file" | sed 's,.*/,,;s/\..*//'` + base=`echo "$file" | sed 's,.*[\\/],,;s/\..*//'` # Get the list of macros which are defined in Autoconf level. # Get rid of the macros we are not interested in. cat $file | @@ -180,14 +181,14 @@ do sort | uniq | # Watch out we are `set -e': don't fail. - ( egrep -v "$ac_exclude_egrep";: ) >acdefuns + ( egrep -v "$ac_exclude_egrep" || true) >acdefuns # Get the list of macros which are defined in Autoupdate level. cat $file | sed -n 's/^AU_DEFUN(\[*\([a-zA-Z][a-zA-Z0-9_]*\).*$/\1/p' | sort | uniq | - ( egrep -v "$au_exclude_egrep";: ) > audefuns + ( egrep -v "$au_exclude_egrep" || true) > audefuns # Filter out required macros. { @@ -211,11 +212,11 @@ MK_EOF echo "AT_CHECK_AU_MACRO([$macro])" fi done - } >$as_me.tat + } >$base.tat # In one atomic step so that if something above fails, the trap # preserves the old version of the file. - mv $as_me.tat $base.at + mv $base.tat $base.at done rm -f acdefuns audefuns requires