>>>>> "AD" == Akim Demaille <[EMAIL PROTECTED]> writes:
AD> So I pulled out the definition of the macro out of AC_OUTPUT, removed
AD> the useless (or have I missed something) changequote (changequote is
AD> *hell*), and it works.
AD> dnl CPP_MAKEFILE(CPPFLAGS,filename)
AD> define([CPP_MAKEFILE],
AD> [echo creating $dir/[$2]
AD> $CPP -I. -I${top_srcdir}/src [$1] junk.c \
AD> dnl Delete line directives inserted by $CPP
AD> | sed -e 's/^\#.*//' \
AD> dnl Delete spurious blanks inserted by $CPP
AD> -e 's/^[[ TAB][ TAB]]*$//'\
AD> -e 's/^ /TAB/' \
AD> dnl Delete blank lines
AD> | sed -n -e '/^..*$/p' \
AD> dnl Restore lines quoted above to original contents.
AD> | sed '/^\"/ {
AD> s/\\\([\"]\)/\1/g
AD> s/^[[ TAB]]*\"//
AD> s/\"[[ TAB]]*$//
AD> }' > Makefile.new
AD> chmod 444 Makefile.new
AD> mv -f Makefile.new [$2]
AD> ])dnl CPP_MAKEFILE
Well, TAB is a macro defined to you-know-what, and I know of no way to
quote a non-paired quote character, so [ TAB] cannot be properly
expanded without changequote. Of course, we could use a real tab
character in the source instead of TAB, but that would be less
readable.
Regarding your comment about defining a macro inside AC_OUTPUT: it's a
general principle of good software engineering to define everything as
close to its use and in as small a scope as possible. So logically,
if it's only used in AC_OUTPUT, what better place to define it?