From: Akim Demaille Date: Fri, 12 Apr 2002 09:56:10 +0000 (+0000) Subject: * tests/wrappl.as: New, M4sh precursor of wrappl.in. X-Git-Tag: AUTOCONF-2.53a~29 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=15769d2c6a06aa46d34a8123e43cb19c0879dec4;p=thirdparty%2Fautoconf.git * tests/wrappl.as: New, M4sh precursor of wrappl.in. --- diff --git a/ChangeLog b/ChangeLog index 261a41284..17d2627e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2002-04-12 Akim Demaille + + * tests/wrappl.as: New, M4sh precursor of wrappl.in. + 2002-04-10 Akim Demaille * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Install the Zsh diff --git a/tests/Makefile.am b/tests/Makefile.am index 6442df4b5..ab2870c04 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -21,7 +21,7 @@ # We don't actually distribute the testsuite, since one only # needs m4 to build it, m4 being required anyway to install Autoconf. EXTRA_DIST = $(TESTSUITE_AT) atspecific.m4 mktests.sh \ - atlocal.in package.m4 wrapsh.as + atlocal.in package.m4 wrappl.as wrapsh.as # Running the uninstalled scripts. check_SCRIPTS = autoconf autoheader autoreconf autom4te autoscan autoupdate ifnames @@ -55,6 +55,9 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac $(srcdir)/wrapsh.in: $(srcdir)/wrapsh.as ./autom4te --language=M4sh $(srcdir)/wrapsh.as -o $@ +$(srcdir)/wrappl.in: $(srcdir)/wrappl.as + ./autom4te --language=M4sh $(srcdir)/wrappl.as -o $@ + ## ------------ ## ## Test suite. ## diff --git a/tests/Makefile.in b/tests/Makefile.in index c47ff1b07..ab725174d 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -83,7 +83,7 @@ lispdir = @lispdir@ # We don't actually distribute the testsuite, since one only # needs m4 to build it, m4 being required anyway to install Autoconf. EXTRA_DIST = $(TESTSUITE_AT) atspecific.m4 mktests.sh \ - atlocal.in package.m4 wrapsh.as + atlocal.in package.m4 wrappl.as wrapsh.as # Running the uninstalled scripts. @@ -370,6 +370,9 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac $(srcdir)/wrapsh.in: $(srcdir)/wrapsh.as ./autom4te --language=M4sh $(srcdir)/wrapsh.as -o $@ + +$(srcdir)/wrappl.in: $(srcdir)/wrappl.as + ./autom4te --language=M4sh $(srcdir)/wrappl.as -o $@ $(TESTSUITE): $(srcdir)/package.m4 \ atspecific.m4 \ $(TESTSUITE_AT) \ diff --git a/tests/wrappl.as b/tests/wrappl.as new file mode 100644 index 000000000..8eb5a2a59 --- /dev/null +++ b/tests/wrappl.as @@ -0,0 +1,23 @@ +AS_INIT[]dnl -*- shell-script -*- +# @configure_input@ +# Running `$0' as if it were installed. + +# Be sure to use the non installed Perl modules. +autom4te_perllibdir=@abs_top_srcdir@/lib +export autom4te_perllibdir + +case $as_me in + ifnames) + # Does not have lib files. + exec @abs_top_builddir@/bin/$as_me ${1+"$@"} + ;; + autom4te) + AUTOM4TE_CFG=@abs_top_builddir@/lib/autom4te.cfg + export AUTOM4TE_CFG + ;; +esac + +# We might need files from build (frozen files), in addition of src files. +exec @abs_top_builddir@/bin/$as_me \ + -I @abs_top_builddir@/lib \ + -I @abs_top_srcdir@/lib ${1+"$@"} diff --git a/tests/wrappl.in b/tests/wrappl.in index b6387cb83..c708d4ee5 100644 --- a/tests/wrappl.in +++ b/tests/wrappl.in @@ -1,21 +1,91 @@ #! /bin/sh +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# NLS nuisances. +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +(set +x; test -n "`(LANG=C; export LANG) 2>&1`") && + { $as_unset LANG || test "${LANG+set}" != set; } || + { LANG=C; export LANG; } +(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && + { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || + { LC_ALL=C; export LC_ALL; } +(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && + { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || + { LC_TIME=C; export LC_TIME; } +(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && + { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || + { LC_CTYPE=C; export LC_CTYPE; } +(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && + { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || + { LANGUAGE=C; export LANGUAGE; } +(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && + { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || + { LC_COLLATE=C; export LC_COLLATE; } +(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && + { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || + { LC_NUMERIC=C; export LC_NUMERIC; } +(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && + { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || + { LC_MESSAGES=C; export LC_MESSAGES; } + + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + # @configure_input@ # Running `$0' as if it were installed. -me=`echo "$0" | sed -e 's,.*[\\/],,'` - # Be sure to use the non installed Perl modules. -# We need no special protection for the subtools (e.g., autoheader runs -# autoconf which runs autom4te) because by themselves, they try to use -# subtools from the same directory (i.e., foo/autoheader will run -# foo/autoconf etc.). autom4te_perllibdir=@abs_top_srcdir@/lib export autom4te_perllibdir -case $me in +case $as_me in ifnames) # Does not have lib files. - exec @abs_top_builddir@/bin/$me ${1+"$@"} + exec @abs_top_builddir@/bin/$as_me ${1+"$@"} ;; autom4te) AUTOM4TE_CFG=@abs_top_builddir@/lib/autom4te.cfg @@ -24,6 +94,6 @@ case $me in esac # We might need files from build (frozen files), in addition of src files. -exec @abs_top_builddir@/bin/$me \ +exec @abs_top_builddir@/bin/$as_me \ -I @abs_top_builddir@/lib \ -I @abs_top_srcdir@/lib ${1+"$@"} diff --git a/tests/wrapsh.as b/tests/wrapsh.as index 811f8b18a..8a7361411 100644 --- a/tests/wrapsh.as +++ b/tests/wrapsh.as @@ -1,5 +1,4 @@ -AS_INIT +AS_INIT[]dnl -*- shell-script -*- +# @configure_input@ # Running `$0' as if it were installed. -me=`echo "$0" | sed -e 's,.*[\\/],,'` - -exec @abs_top_builddir@/bin/$me --include @abs_top_builddir@/lib ${1+"$@"} +exec @abs_top_builddir@/bin/$as_me --include @abs_top_builddir@/lib ${1+"$@"} diff --git a/tests/wrapsh.in b/tests/wrapsh.in index 82e6f7210..005603fd9 100644 --- a/tests/wrapsh.in +++ b/tests/wrapsh.in @@ -7,8 +7,8 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh performs word splitting on ${1+"$@"}, which is contrary to - # our usage. Disable this feature. + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix @@ -75,8 +75,6 @@ echo X/"$0" | s/.*/./; q'` - +# @configure_input@ # Running `$0' as if it were installed. -me=`echo "$0" | sed -e 's,.*\\/,,'` - -exec @abs_top_builddir@/bin/$me --include @abs_top_builddir@/lib ${1+"$@"} +exec @abs_top_builddir@/bin/$as_me --include @abs_top_builddir@/lib ${1+"$@"}