[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
33-private-heredoc-tags.patch
From: |
Akim Demaille |
Subject: |
33-private-heredoc-tags.patch |
Date: |
Mon, 20 Aug 2001 16:47:54 +0200 |
There are definitely tags below which cannot interfere with the
user's. But being stupid and replacing them all is just the easiest.
And I like that :)
Index: ChangeLog
from Akim Demaille <address@hidden>
Huh!?!?! There are still some user EOF tags used, which prevents
their use in AC_CONFIG_COMMANDS for instance...
* lib/autoconf/general.m4, lib/autoconf/specific.m4,
* lib/autotest/general.m4: Rename the EOF tags as `_ACEOF',
`_CSEOF', or `_ATEOF', as appropriate.
* lib/m4sugar/Makefile.am, lib/autoconf/Makefile.am,
* lib/autotest/Makefile.am (check-local): Enforce this constraint.
Index: lib/autoconf/Makefile.am
--- lib/autoconf/Makefile.am Thu, 16 Aug 2001 11:39:27 +0200 akim
+++ lib/autoconf/Makefile.am Sun, 19 Aug 2001 12:24:46 +0200 akim
@@ -52,6 +52,22 @@
+## -------- ##
+## Checks. ##
+## -------- ##
+
+check-local:
+ if (cd $(srcdir) && \
+ egrep '^_?EOF' $(distautoconflib_DATA)) >eof.log; then \
+ echo "ERROR: user EOF tags were used:" >&2; \
+ sed "s,^,$*.m4: ," <eof.log >&2; \
+ echo >&2; \
+ exit 1; \
+ else \
+ rm -f eof.log; \
+ fi
+
+
## ------------------ ##
## The frozen files. ##
## ------------------ ##
@@ -97,6 +113,7 @@ .m4.m4f:
else \
rm -f freeze.log; \
fi
+
# Some day we should explain to Automake how to use autom4te to compute
# the dependencies...
Index: lib/autoconf/general.m4
--- lib/autoconf/general.m4 Sun, 19 Aug 2001 11:28:12 +0200 akim
+++ lib/autoconf/general.m4 Sun, 19 Aug 2001 12:10:10 +0200 akim
@@ -1083,7 +1083,7 @@ m4_define([_AC_INIT_HELP],
if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
- cat <<EOF
+ cat <<_ACEOF
\`configure' configures m4_ifset([AC_PACKAGE_STRING],
[AC_PACKAGE_STRING],
[this package]) to adapt to many kinds of systems.
@@ -1106,9 +1106,9 @@ Configuration:
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or \`..']
-EOF
+_ACEOF
- cat <<EOF
+ cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
@@ -1135,9 +1135,9 @@ Configuration:
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--infodir=DIR info documentation [PREFIX/info]
--mandir=DIR man documentation [PREFIX/man]
-EOF
+_ACEOF
- cat <<\EOF]
+ cat <<\_ACEOF]
m4_divert_pop([HELP_BEGIN])dnl
dnl The order of the diversions here is
dnl - HELP_BEGIN
@@ -1162,7 +1162,7 @@ Configuration:
dnl initialized below, in which we dump the trailer (handling of the
dnl recursion for instance).
m4_divert_push([HELP_ENABLE])dnl
-EOF
+_ACEOF
fi
if test -n "$ac_init_help"; then
@@ -1170,12 +1170,12 @@ Configuration:
[ case $ac_init_help in
short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
esac])
- cat <<\EOF
+ cat <<\_ACEOF
m4_divert_pop([HELP_ENABLE])dnl
m4_divert_push([HELP_END])dnl
m4_ifset([AC_PACKAGE_BUGREPORT], [
Report bugs to <AC_PACKAGE_BUGREPORT>.])
-EOF
+_ACEOF
fi
if test "$ac_init_help" = "recursive"; then
@@ -1225,7 +1225,7 @@ Configuration:
m4_define([_AC_INIT_VERSION],
[m4_divert_text([VERSION_BEGIN],
[if $ac_init_version; then
- cat <<\EOF])dnl
+ cat <<\_ACEOF])dnl
m4_ifset([AC_PACKAGE_STRING],
[m4_divert_text([VERSION_BEGIN],
[dnl
@@ -1233,7 +1233,7 @@ m4_define([_AC_INIT_VERSION],
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
generated by GNU Autoconf AC_ACVERSION])])
m4_divert_text([VERSION_END],
-[EOF
+[_ACEOF
exit 0
fi])dnl
])# _AC_INIT_VERSION
@@ -1246,7 +1246,7 @@ m4_define([_AC_INIT_CONFIG_LOG],
[m4_divert_text([INIT_PREPARE],
[m4_define([AS_MESSAGE_LOG_FD], 5)dnl
exec AS_MESSAGE_LOG_FD>config.log
-cat >&AS_MESSAGE_LOG_FD <<EOF
+cat >&AS_MESSAGE_LOG_FD <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -1258,15 +1258,15 @@ m4_define([_AC_INIT_CONFIG_LOG],
$ $[0] address@hidden
-EOF
+_ACEOF
AS_UNAME >&AS_MESSAGE_LOG_FD
-cat >&AS_MESSAGE_LOG_FD <<EOF
+cat >&AS_MESSAGE_LOG_FD <<_ACEOF
## ------------ ##
## Core tests. ##
## ------------ ##
-EOF
+_ACEOF
])])# _AC_INIT_CONFIG_LOG
# _AC_INIT_PREPARE_FS_SEPARATORS
@@ -1972,9 +1972,9 @@ m4_define([AC_DEFINE_TRACE],
m4_define([AC_DEFINE],
[AC_DEFINE_TRACE([$1])dnl
m4_ifval([$3], [_AH_TEMPLATE_OLD([$1], [$3])])dnl
-cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\_ACEOF
address@hidden:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
-EOF
+_ACEOF
])
@@ -1984,9 +1984,9 @@ m4_define([AC_DEFINE],
m4_define([AC_DEFINE_UNQUOTED],
[AC_DEFINE_TRACE([$1])dnl
m4_ifval([$3], [_AH_TEMPLATE_OLD([$1], [$3])])dnl
-cat >>confdefs.h <<EOF
+cat >>confdefs.h <<_ACEOF
address@hidden:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
-EOF
+_ACEOF
])
@@ -3571,7 +3571,7 @@ m4_define([_AC_OUTPUT_CONFIG_STATUS],
echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
fi
-cat >>$CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\_ACEOF
ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
@@ -3613,9 +3613,9 @@ Usage: $[0] [[OPTIONS]] [[FILE]]...
])dnl
Report bugs to <address@hidden>."
-EOF
+_ACEOF
-cat >>$CONFIG_STATUS <<EOF
+cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.status[]dnl
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
@@ -3632,9 +3632,9 @@ Usage: $[0] [[OPTIONS]] [[FILE]]...
dnl here document, which might result in `INSTALL=/bin/install -c'.
INSTALL="$INSTALL"
])dnl
-EOF
+_ACEOF
-cat >>$CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\_ACEOF
# If no file are specified by the user, then we need to provide default
# value. By we need to know if files were specified by the user.
ac_need_defaults=:
@@ -3656,13 +3656,13 @@ Usage: $[0] [[OPTIONS]] [[FILE]]...
case $[1] in
# Handling of the options.
-EOF
-cat >>$CONFIG_STATUS <<EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
echo "running $SHELL $[0] " $ac_configure_args " --no-create
--no-recursion"
exec $SHELL $[0] $ac_configure_args --no-create --no-recursion ;;
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+_ACEOF
+cat >>$CONFIG_STATUS <<\_CSEOF
--version | --vers* | -V )
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
@@ -3709,17 +3709,17 @@ Usage: $[0] [[OPTIONS]] [[FILE]]...
on `(hostname || uname -n) 2>/dev/null | sed 1q`
_ACEOF
-EOF
+_CSEOF
dnl We output the INIT-CMDS first for obvious reasons :)
m4_ifset([_AC_OUTPUT_COMMANDS_INIT],
-[cat >>$CONFIG_STATUS <<EOF
+[cat >>$CONFIG_STATUS <<_CSEOF
#
# INIT-COMMANDS section.
#
_AC_OUTPUT_COMMANDS_INIT()
-EOF])
+_CSEOF])
dnl Issue this section only if there were actually config files.
@@ -3727,7 +3727,7 @@ Usage: $[0] [[OPTIONS]] [[FILE]]...
dnl or AC_LIST_LINKS is set.
m4_ifval(AC_LIST_HEADERS()AC_LIST_LINKS()AC_LIST_FILES()AC_LIST_COMMANDS(),
[
-cat >>$CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\_CSEOF
for ac_config_target in $ac_config_targets
do
case "$ac_config_target" in
@@ -3773,7 +3773,7 @@ Usage: $[0] [[OPTIONS]] [[FILE]]...
AS_TMPDIR(cs)
-EOF
+_CSEOF
])[]dnl m4_ifval
dnl The following four sections are in charge of their own here
@@ -3783,10 +3783,10 @@ Usage: $[0] [[OPTIONS]] [[FILE]]...
m4_ifset([AC_LIST_LINKS], [_AC_OUTPUT_LINKS()])dnl
m4_ifset([AC_LIST_COMMANDS], [_AC_OUTPUT_COMMANDS()])dnl
-cat >>$CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\_CSEOF
AS_EXIT(0)
-EOF
+_CSEOF
chmod +x $CONFIG_STATUS
])# _AC_OUTPUT_CONFIG_STATUS
@@ -3805,7 +3805,7 @@ m4_define([AC_OUTPUT_MAKE_DEFS],
# If the first sed substitution is executed (which looks for macros that
# take arguments), then we branch to the quote section. Otherwise,
# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\EOF
+cat >confdef2opt.sed <<\_ACEOF
t clear
: clear
s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[
]*\(.*\),-D\1=\2,g
@@ -3819,7 +3819,7 @@ m4_define([AC_OUTPUT_MAKE_DEFS],
s,\],\\&,g
s,\$,$$,g
p
-EOF
+_ACEOF
# We use echo to avoid assuming a particular line-breaking character.
# The extra dot is to prevent the shell from consuming trailing
# line-breaks from the sub-command output. A line-break within
@@ -3840,7 +3840,7 @@ m4_define([AC_OUTPUT_MAKE_DEFS],
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
# Upon exit, no here document shall be opened.
m4_define([_AC_OUTPUT_FILES],
-[cat >>$CONFIG_STATUS <<EOF
+[cat >>$CONFIG_STATUS <<_CSEOF
#
# CONFIG_FILES section.
@@ -3861,9 +3861,9 @@ m4_define([_AC_OUTPUT_FILES],
_AC_SUBST_SED_PROGRAM()dnl
CEOF
-EOF
+_CSEOF
- cat >>$CONFIG_STATUS <<\EOF
+ cat >>$CONFIG_STATUS <<\_CSEOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
dnl One cannot portably go further than 100 commands because of HP-UX.
@@ -3904,8 +3904,8 @@ m4_define([_AC_OUTPUT_FILES],
fi
fi # test -n "$CONFIG_FILES"
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+_CSEOF
+cat >>$CONFIG_STATUS <<\_CSEOF
for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
@@ -3984,15 +3984,15 @@ m4_define([_AC_OUTPUT_FILES],
fi;;
esac
done` || AS_EXIT([1])
-EOF
-cat >>$CONFIG_STATUS <<EOF
+_CSEOF
+cat >>$CONFIG_STATUS <<_CSEOF
dnl Neutralize VPATH when `$srcdir' = `.'.
sed "$ac_vpsub
dnl Shell code in configure.ac might set extrasub.
dnl FIXME: do we really want to maintain this feature?
$extrasub
-EOF
-cat >>$CONFIG_STATUS <<\EOF
+_CSEOF
+cat >>$CONFIG_STATUS <<\_CSEOF
:t
[/@[a-zA-Z_][a-zA-Z_0-9]*@/!b]
s,@configure_input@,$configure_input,;t t
@@ -4024,7 +4024,7 @@ m4_define([_AC_OUTPUT_FILES],
esac
])dnl
done
-EOF
+_CSEOF
])# _AC_OUTPUT_FILES
@@ -4073,7 +4073,7 @@ m4_define([_AC_OUTPUT_FILES],
# The result is about, hm, ... times blah... plus.... Ahem. The
# result is about much faster.
m4_define([_AC_OUTPUT_HEADERS],
-[cat >>$CONFIG_STATUS <<\EOF
+[cat >>$CONFIG_STATUS <<\_CSEOF
#
# CONFIG_HEADER section.
@@ -4134,7 +4134,7 @@ m4_define([_AC_OUTPUT_HEADERS],
# Remove the trailing spaces.
sed 's/[[ ]]*$//' $ac_file_inputs >$tmp/in
-EOF
+_CSEOF
# Transform confdefs.h into two sed scripts, `conftest.defines' and
# `conftest.undefs', that substitutes the proper values into
@@ -4150,7 +4150,7 @@ m4_define([_AC_OUTPUT_HEADERS],
# `end' is used to avoid that the second main sed command (meant for
# 0-ary CPP macros) applies to n-ary macro definitions.
# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\EOF
+cat >confdef2sed.sed <<\_ACEOF
dnl Double quote for `[ ]' and `define'.
[s/[\\&,]/\\&/g
s,[\\$`],\\&,g
@@ -4160,7 +4160,7 @@ m4_define([_AC_OUTPUT_HEADERS],
t end
s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[
]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: end]
-EOF
+_ACEOF
# If some macros were called several times there might be several times
# the same #defines, which is useless. Nevertheless, we may not want to
# sort them, since we want the *last* AC-DEFINE to be honored.
@@ -4171,9 +4171,9 @@ m4_define([_AC_OUTPUT_HEADERS],
# This sed command replaces #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
-cat >>conftest.undefs <<\EOF
+cat >>conftest.undefs <<\_ACEOF
[s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,]
-EOF
+_ACEOF
# Break up conftest.defines because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
@@ -4231,7 +4231,7 @@ m4_define([_AC_OUTPUT_HEADERS],
rm -f conftest.undefs
dnl Now back to your regularly scheduled config.status.
-cat >>$CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\_CSEOF
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated automatically by config.status. */
@@ -4264,7 +4264,7 @@ m4_define([_AC_OUTPUT_HEADERS],
esac
])dnl
done
-EOF
+_CSEOF
])# _AC_OUTPUT_HEADERS
@@ -4275,7 +4275,7 @@ m4_define([_AC_OUTPUT_HEADERS],
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
# Upon exit, no here document shall be opened.
m4_define([_AC_OUTPUT_LINKS],
-[cat >>$CONFIG_STATUS <<\EOF
+[cat >>$CONFIG_STATUS <<\_CSEOF
#
# CONFIG_LINKS section.
@@ -4322,7 +4322,7 @@ m4_define([_AC_OUTPUT_LINKS],
esac
])dnl
done
-EOF
+_CSEOF
])# _AC_OUTPUT_LINKS
@@ -4334,7 +4334,7 @@ m4_define([_AC_OUTPUT_LINKS],
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
# Upon exit, no here document shall be opened.
m4_define([_AC_OUTPUT_COMMANDS],
-[cat >>$CONFIG_STATUS <<\EOF
+[cat >>$CONFIG_STATUS <<\_CSEOF
#
# CONFIG_COMMANDS section.
@@ -4351,7 +4351,7 @@ m4_define([_AC_OUTPUT_COMMANDS],
AC_LIST_COMMANDS_COMMANDS()dnl
esac
done
-EOF
+_CSEOF
])# _AC_OUTPUT_COMMANDS
Index: lib/autoconf/specific.m4
--- lib/autoconf/specific.m4 Sat, 23 Jun 2001 23:01:08 +0200 akim
+++ lib/autoconf/specific.m4 Sun, 19 Aug 2001 12:02:27 +0200 akim
@@ -84,10 +84,10 @@ AC_DEFUN([AC_PROG_MAKE_SET],
[AC_MSG_CHECKING([whether ${MAKE-make} sets \${MAKE}])
set dummy ${MAKE-make}; ac_make=`echo "$[2]" | sed 'y,./+-,__p_,'`
AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set,
-[cat >conftest.make <<\EOF
+[cat >conftest.make <<\_ACEOF
all:
@echo 'ac_maketemp="${MAKE}"'
-EOF
+_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
@@ -583,10 +583,10 @@ m4_define([_AC_PATH_X_XMKMF],
if mkdir conftest.dir; then
cd conftest.dir
# Make sure to not put "make" in the Imakefile rules, since we grep it out.
- cat >Imakefile <<'EOF'
+ cat >Imakefile <<'_ACEOF'
acfindx:
@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}";
ac_im_libdir="${LIBDIR}"'
-EOF
+_ACEOF
if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
Index: lib/autotest/Makefile.am
--- lib/autotest/Makefile.am Thu, 16 Aug 2001 11:39:27 +0200 akim
+++ lib/autotest/Makefile.am Sun, 19 Aug 2001 12:24:59 +0200 akim
@@ -15,3 +15,19 @@
ETAGS_ARGS = --lang=none \
--regex='/\(A[CU]_DEFUN\|m4_\(defun\|define\)\|define\)(\[\([^]]*\)\]/\3/'
+
+
+## -------- ##
+## Checks. ##
+## -------- ##
+
+check-local:
+ if (cd $(srcdir) && \
+ egrep '^_?EOF' $(autotestlib_DATA)) >eof.log; then \
+ echo "ERROR: user EOF tags were used:" >&2; \
+ sed "s,^,$*.m4: ," <eof.log >&2; \
+ echo >&2; \
+ exit 1; \
+ else \
+ rm -f eof.log; \
+ fi
Index: lib/autotest/general.m4
--- lib/autotest/general.m4 Sun, 19 Aug 2001 11:34:51 +0200 akim
+++ lib/autotest/general.m4 Sun, 19 Aug 2001 12:02:47 +0200 akim
@@ -153,7 +153,7 @@ m4_define([AT_data_files], [stdout expou
if $at_help; then
# If tests were specified, display only their title.
if test -z "$at_tests"; then
- cat <<EOF
+ cat <<_ATEOF
Usage: $[0] [[OPTION]]... [[TESTS]]
Run all the tests, or the selected TESTS.
@@ -166,16 +166,16 @@ Options:
-x Have the shell to trace command execution
Tests:
-EOF
+_ATEOF
else
# " 1 42 45 " => " (1|42|45): "
at_tests_pattern=`echo "$at_tests" | sed 's/^ *//;s/ *$//;s/ */|/g'`
at_tests_pattern=" (${at_tests_pattern}): "
fi
- egrep -e "$at_tests_pattern" <<EOF
+ egrep -e "$at_tests_pattern" <<_ATEOF
m4_divert([HELP])dnl Help message inserted here.
m4_divert([SETUP])dnl
-EOF
+_ATEOF
exit 0
fi
Index: lib/m4sugar/Makefile.am
--- lib/m4sugar/Makefile.am Thu, 16 Aug 2001 11:39:27 +0200 akim
+++ lib/m4sugar/Makefile.am Sun, 19 Aug 2001 12:25:06 +0200 akim
@@ -15,3 +15,19 @@
ETAGS_ARGS = --lang=none \
--regex='/\(A[CU]_DEFUN\|m4_\(defun\|define\)\|define\)(\[\([^]]*\)\]/\3/'
+
+
+## -------- ##
+## Checks. ##
+## -------- ##
+
+check-local:
+ if (cd $(srcdir) && \
+ egrep '^_?EOF' $(m4sugarlib_DATA)) >eof.log; then \
+ echo "ERROR: user EOF tags were used:" >&2; \
+ sed "s,^,$*.m4: ," <eof.log >&2; \
+ echo >&2; \
+ exit 1; \
+ else \
+ rm -f eof.log; \
+ fi
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 33-private-heredoc-tags.patch,
Akim Demaille <=