[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CVS Automake fails to make check with CVS Autoconf

From: Noah Misch
Subject: Re: CVS Automake fails to make check with CVS Autoconf
Date: Sun, 24 Jun 2007 12:35:02 -0700
User-agent: Mutt/1.5.9i

On Fri, Jun 22, 2007 at 08:40:14PM +0200, Ralf Wildenhues wrote:
> # Test that AC_SUBST($1) does something sensible.  From Ulrich
> # Drepper.
> It is broken by this recent (and very sensible) patch against Autoconf:
> | 2007-06-12  Noah Misch  <address@hidden>
> | 
> |         * lib/autoconf/general.m4 (AC_SUBST): Raise a fatal error if 
> |         not a valid shell variable name.
> |         * tests/mktests.sh (ac_exclude_list): Add AC_ARG_VAR.
> |         * tests/torture.at (AC_SUBST: variable name validation): New test.
> |         Reported by Andreas Schwab.

> Suggestions?

Some speculation: macros like AC_CHECK_PROG use `AC_SUBST([$1])'.  `aclocal'
used to have a home-grown parser for the input files; upon parsing such code, it
would take the $1 literally, rather than having a macro argument to substitute.
This test ensured that such constructs did not invalidate the makefile.  In
modern times, `aclocal' uses `autoconf' to trace the input files.

Presuming this speculation is accurate, we can change the test to use that sort
of substitution from a macro definition, which is hopefully how it was always
used (untested):

        * tests/subst.test: Move the AC_SUBST into a macro definition.  Avoids
        an error from CVS Autoconf.

diff -urp -X ../dontdiff am-clean/tests/subst.test am-subst/tests/subst.test
--- am-clean/tests/subst.test   2005-05-14 16:28:56.000000000 -0400
+++ am-subst/tests/subst.test   2007-06-24 15:19:40.000000000 -0400
@@ -24,8 +24,9 @@
 . ./defs || exit 1
 cat >> configure.in << 'END'
-AC_SUBST([$]$1)  dnl this is the actual invocation that was used
 : > Makefile.am

I am skeptical about the second deleted line, because it looks like a different
usage entirely.  Perhaps this sort of thing worked at one point:

  for $1 in a b c; do

reply via email to

[Prev in Thread] Current Thread [Next in Thread]