* lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Drop the

`CEOF$ac_eof' special marker, the awk script cannot contain a
line matching `^CEOF', so this is not needed any more.
* tests/torture.at (Substitute a newline): Expose the `%!_!# '
special marker in the test.
This commit is contained in:
Ralf Wildenhues 2006-12-07 05:16:59 +00:00
parent 06a23d8dfc
commit e6c5fd0d0a
3 changed files with 20 additions and 11 deletions

View File

@ -1,3 +1,11 @@
2006-12-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Drop the
`CEOF$ac_eof' special marker, the awk script cannot contain a
line matching `^CEOF', so this is not needed any more.
* tests/torture.at (Substitute a newline): Expose the `%!_!# '
special marker in the test.
2006-12-06 Stepan Kasal <kasal@ucw.cz>
* tests/tools.at (autom4te preselections): Use `find -newer';

View File

@ -412,12 +412,6 @@ dnl Do not use grep on conf$$subs.awk, since AIX grep has a line length limit.
done
rm -f conf$$subs.sh
dnl Similarly, avoid grep here too.
ac_eof=`sed -n '/^CEOF[[0-9]]*$/s/CEOF/0/p' conf$$subs.awk`
if test -n "$ac_eof"; then
ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
ac_eof=`expr $ac_eof + 1`
fi
dnl Initialize an awk array of substitutions, keyed by variable name.
dnl
dnl The initial line contains the variable name VAR, then a `!'.
@ -445,7 +439,7 @@ dnl - Writing `$ 0' prevents expansion by both the shell and m4 here.
dnl
dnl m4-double-quote most of the scripting for readability.
[cat >>$CONFIG_STATUS <<_ACEOF
cat >>"\$tmp/subs.awk" <<\CEOF$ac_eof
cat >>"\$tmp/subs.awk" <<\CEOF
_ACEOF
sed -n '
h
@ -492,7 +486,7 @@ t delim
' >>$CONFIG_STATUS
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF
CEOF$ac_eof
CEOF
cat >>"\$tmp/subs.awk" <<CEOF
for (key in S) S_is_set[key] = 1
FS = ""

View File

@ -674,6 +674,7 @@ AT_SETUP([Substitute a newline])
AT_DATA([Foo.in],
[@foo@
@bar@
])
AT_DATA([configure.ac],
@ -681,19 +682,25 @@ AT_DATA([configure.ac],
AC_CONFIG_AUX_DIR($top_srcdir/build-aux)
foo='one
two'
bar='%!_!# ''
x'
AC_SUBST([foo])
AC_SUBST([bar])
AC_CONFIG_FILES([Foo])
AC_PROG_AWK
AC_OUTPUT
]])
echo 'one
two
%!_!# ''
x' >expout
AT_CHECK_AUTOCONF
# Check both awk and the result of AC_PROG_AWK
for awk_arg in FOO= AWK=awk; do
AT_CHECK_CONFIGURE([$awk_arg])
AT_CHECK([cat Foo], 0, [one
two
])
AT_CHECK([cat Foo], 0, [expout])
done
AT_CLEANUP