automake
[Top][All Lists]
Advanced

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

Re: Fail: pr300 (Was: Re: Automake 1.6 Release)


From: Akim Demaille
Subject: Re: Fail: pr300 (Was: Re: Automake 1.6 Release)
Date: 03 Apr 2002 15:24:45 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

>>>>> "adl" == Alexandre Duret-Lutz <address@hidden> writes:

>> configure.in:8: error: `Makefile' is already registered with
>> AC_CONFIG_FILES or AC_OUTPUT.

adl> Thanks!  This is a bug in the testsuite that you can safely
adl> ignore.

adl> (Akim: any idea why CVS Autoconf does not print this error
adl> anymore?)

Yep, a spurious parenthesis, which I spent some time to hunt...  The
minimal patch is the following, and I actual apply what follows.

@@ -186,8 +187,8 @@
 # matching.  The big problem is then that the active characters should
 # be quoted.  Currently `+*.' are quoted.
 m4_define([AC_CONFIG_IF_MEMBER],
-[m4_bmatch($2, [\(^\| \)]m4_re_escape([$1])[\(:\| \|$\)]),
           [$3], [$4])])
+[m4_bmatch($2, [\(^\| \)]m4_re_escape([$1])[\(:\| \|$\)],
           [$3], [$4])])
 

Thanks!

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * lib/autoconf/status.m4 (_AC_CONFIG_FILE, _AC_CONFIG_HEADER)
        (_AC_CONFIG_COMMAND, _AC_CONFIG_LINK): New.
        Use dnl, not the KILL diversion.
        Extracted from...
        (AC_CONFIG_FILES, AC_CONFIG_HEADERS, AC_CONFIG_COMMANDS)
        (AC_CONFIG_LINKS): here.
        Adjust.
        Don't use the KILL diversion, as it kills spurious output, which
        results in failures being hidden.
        Use m4_defn where appropriate.
        (AC_CONFIG_IF_MEMBER): Kill the real bug: a spurious parenthesis
        after the second argument.
        Use m4_defn.
        * lib/autom4te.in (Autoconf, Autotest, M4sh): Don't pass --warning
        syntax, as it is provided by M4sugar.
        * tests/torture.at (Multiple AC_CONFIG_FILES): New.

Index: lib/autom4te.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autom4te.in,v
retrieving revision 1.10
diff -u -u -r1.10 autom4te.in
--- lib/autom4te.in 8 Mar 2002 11:46:08 -0000 1.10
+++ lib/autom4te.in 3 Apr 2002 13:19:51 -0000
@@ -1,6 +1,6 @@
 # Definition of Autom4te option sets.                     -*- Makefile -*-
 #
-# Copyright 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
 #
 # This file is part of GNU Autoconf.
 #
@@ -131,7 +131,6 @@
 args: acsite.m4?
 args: aclocal.m4?
 args: --mode 777
-args: --warning syntax
 args: --language Autoheader-preselections
 args: --language Automake-preselections
 args: --language Autoreconf-preselections
@@ -149,7 +148,6 @@
 args: autotest/autotest.m4f
 args: package.m4?
 args: --mode 777
-args: --warning syntax
 args: --language M4sh
 end-language: "Autotest"
 
@@ -162,7 +160,6 @@
 args: --include @datadir@
 args: m4sugar/m4sh.m4f
 args: --mode 777
-args: --warning syntax
 args: --language M4sugar
 end-language: "M4sh"
 
Index: lib/autoconf/status.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v
retrieving revision 1.19
diff -u -u -r1.19 status.m4
--- lib/autoconf/status.m4 2 Mar 2002 15:19:48 -0000 1.19
+++ lib/autoconf/status.m4 3 Apr 2002 13:19:51 -0000
@@ -174,9 +174,10 @@
 ## Ensuring the unicity of the tags.  ##
 ## ---------------------------------- ##
 
-# AC_CONFIG_IF_MEMBER(DEST, LIST, ACTION-IF-TRUE, ACTION-IF-FALSE)
+# AC_CONFIG_IF_MEMBER(DEST, LIST-NAME, ACTION-IF-TRUE, ACTION-IF-FALSE)
 # ----------------------------------------------------------------
-# If DEST is member of LIST, expand to ACTION-IF-TRUE, else ACTION-IF-FALSE.
+# If DEST is member of LIST-NAME, expand to ACTION-IF-TRUE, else
+# ACTION-IF-FALSE.
 #
 # LIST is an AC_CONFIG list, i.e., a list of DEST[:SOURCE], separated
 # with spaces.
@@ -186,8 +187,8 @@
 # matching.  The big problem is then that the active characters should
 # be quoted.  Currently `+*.' are quoted.
 m4_define([AC_CONFIG_IF_MEMBER],
-[m4_bmatch($2, [\(^\| \)]m4_re_escape([$1])[\(:\| \|$\)]),
-          [$3], [$4])])
+[m4_bmatch(m4_defn([$2]), [\(^\| \)]m4_re_escape([$1])[\([: ]\|$\)],
+           [$3], [$4])])
 
 
 # AC_FILE_DEPENDENCY_TRACE(DEST, SOURCE1, [SOURCE2...])
@@ -211,10 +212,8 @@
 # -------------------------------------------------------
 # Declare the DESTs depend upon their SOURCE1 etc.
 m4_define([_AC_CONFIG_DEPENDENCIES],
-[m4_divert_push([KILL])
-AC_FOREACH([AC_File], [$1],
-  [_AC_CONFIG_DEPENDENCY(m4_bpatsubst(AC_File, [:], [,]))])
-m4_divert_pop([KILL])dnl
+[AC_FOREACH([AC_File], [$1],
+  [_AC_CONFIG_DEPENDENCY(m4_bpatsubst(AC_File, [:], [,]))])dnl
 ])
 
 
@@ -228,21 +227,19 @@
 # Note that this macro does not check if the list $[1] itself
 # contains doubles.
 m4_define([_AC_CONFIG_UNIQUE],
-[m4_divert_push([KILL])
-AC_FOREACH([AC_File], [$1],
-[m4_pushdef([AC_Dest], m4_bpatsubst(AC_File, [:.*]))
-AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_HEADERS],
-     [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_HEADER or 
AC_CONFIG_HEADERS.])])
+[AC_FOREACH([AC_File], [$1],
+[m4_pushdef([AC_Dest], m4_bpatsubst(AC_File, [:.*]))dnl
+  AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_HEADERS],
+     [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_HEADERS.])])dnl
   AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_LINKS],
-     [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_LINKS.])])
+     [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_LINKS.])])dnl
   AC_CONFIG_IF_MEMBER(AC_Dest, [_AC_LIST_SUBDIRS],
-     [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_SUBDIRS.])])
+     [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_SUBDIRS.])])dnl
   AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_COMMANDS],
-     [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_COMMANDS.])])
+     [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_COMMANDS.])])dnl
   AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_FILES],
-     [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_FILES or 
AC_OUTPUT.])])
-m4_popdef([AC_Dest])])
-m4_divert_pop([KILL])dnl
+     [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_FILES.])])dnl
+m4_popdef([AC_Dest])])dnl
 ])
 
 
@@ -269,6 +266,18 @@
 m4_define([_AC_OUTPUT_COMMANDS_INIT])
 
 
+# _AC_CONFIG_COMMAND(NAME, [COMMANDS])
+# ------------------------------------
+# See below.
+m4_define([_AC_CONFIG_COMMAND],
+[_AC_CONFIG_UNIQUE([$1])dnl
+m4_append([AC_LIST_COMMANDS], [ $1])dnl
+m4_ifval([$2],
+[m4_append([AC_LIST_COMMANDS_COMMANDS],
+[    ]m4_bpatsubst([$1], [:.*])[ ) $2 ;;
+])])dnl
+])
+
 # AC_CONFIG_COMMANDS(NAME...,[COMMANDS], [INIT-CMDS])
 # ---------------------------------------------------
 #
@@ -276,18 +285,10 @@
 # commands must be associated with a NAME, which should be thought
 # as the name of a file the COMMANDS create.
 AC_DEFUN([AC_CONFIG_COMMANDS],
-[m4_divert_push([KILL])
-_AC_CONFIG_UNIQUE([$1])
-m4_append([AC_LIST_COMMANDS], [ $1])
-
-m4_if([$2],,, [AC_FOREACH([AC_Name], [$1],
-[m4_append([AC_LIST_COMMANDS_COMMANDS],
-[    ]m4_bpatsubst(AC_Name, [:.*])[ ) $2 ;;
-])])])
-_AC_CONFIG_COMMANDS_INIT([$3])
-m4_divert_pop([KILL])dnl
+[AC_FOREACH([AC_Name], [$1], [_AC_CONFIG_COMMAND(m4_defn([AC_Name]), [$2])])dnl
+_AC_CONFIG_COMMANDS_INIT([$3])dnl
 ac_config_commands="$ac_config_commands $1"
-])dnl
+])
 
 # Initialize the lists.
 m4_define([AC_LIST_COMMANDS])
@@ -379,6 +380,21 @@
 ## ----------------------- ##
 
 
+# _AC_CONFIG_HEADER(HEADER, [COMMANDS])
+# -------------------------------------
+# See below.
+m4_define([_AC_CONFIG_HEADER],
+[_AC_CONFIG_UNIQUE([$1])dnl
+m4_append([AC_LIST_HEADERS], [ $1])dnl
+_AC_CONFIG_DEPENDENCIES([$1])dnl
+dnl Register the commands
+m4_ifval([$2],
+[m4_append([AC_LIST_HEADERS_COMMANDS],
+[    ]m4_bpatsubst([$1], [:.*])[ ) $2 ;;
+])])dnl
+])
+
+
 # AC_CONFIG_HEADERS(HEADERS..., [COMMANDS], [INIT-CMDS])
 # ------------------------------------------------------
 # Specify that the HEADERS are to be created by instantiation of the
@@ -392,19 +408,10 @@
 #        AC_LIST_HEADERS_COMMANDS
 #      esac
 AC_DEFUN([AC_CONFIG_HEADERS],
-[m4_divert_push([KILL])
-_AC_CONFIG_UNIQUE([$1])
-_AC_CONFIG_DEPENDENCIES([$1])
-m4_append([AC_LIST_HEADERS], [ $1])
-dnl Register the commands
-m4_ifval([$2], [AC_FOREACH([AC_File], [$1],
-[m4_append([AC_LIST_HEADERS_COMMANDS],
-[    ]m4_bpatsubst(AC_File, [:.*])[ ) $2 ;;
-])])])
-_AC_CONFIG_COMMANDS_INIT([$3])
-m4_divert_pop([KILL])dnl
+[AC_FOREACH([AC_File], [$1], [_AC_CONFIG_HEADER(m4_defn([AC_File]), [$2])])dnl
+_AC_CONFIG_COMMANDS_INIT([$3])dnl
 ac_config_headers="$ac_config_headers m4_normalize([$1])"
-])dnl
+])
 
 # Initialize to empty.  It is much easier and uniform to have a config
 # list expand to empty when undefined, instead of special casing when
@@ -664,6 +669,21 @@
 ## --------------------- ##
 
 
+# _AC_CONFIG_LINK(DEST:SOURCE, [COMMANDS])
+# ----------------------------------------
+# See below.
+m4_define([_AC_CONFIG_LINK],
+[_AC_CONFIG_UNIQUE([$1])dnl
+m4_append([AC_LIST_LINKS], [ $1])dnl
+_AC_CONFIG_DEPENDENCIES([$1])dnl
+m4_bmatch([$1], [^\.:\| \.:], [m4_fatal([$0: invalid destination: `.'])])dnl
+dnl Register the commands
+m4_ifval([$2],
+[m4_append([AC_LIST_LINKS_COMMANDS],
+[    ]m4_bpatsubst([$1], [:.*])[ ) $2 ;;
+])])dnl
+])
+
 # AC_CONFIG_LINKS(DEST:SOURCE..., [COMMANDS], [INIT-CMDS])
 # --------------------------------------------------------
 # Specify that config.status should establish a (symbolic if possible)
@@ -671,20 +691,10 @@
 # Reject DEST=., because it is makes it hard for ./config.status
 # to guess the links to establish (`./config.status .').
 AC_DEFUN([AC_CONFIG_LINKS],
-[m4_divert_push([KILL])
-_AC_CONFIG_UNIQUE([$1])
-_AC_CONFIG_DEPENDENCIES([$1])
-m4_bmatch([$1], [^\.:\| \.:], [m4_fatal([$0: invalid destination: `.'])])
-m4_append([AC_LIST_LINKS], [ $1])
-dnl Register the commands
-m4_ifval([$2], [AC_FOREACH([AC_File], [$1],
-[m4_append([AC_LIST_LINKS_COMMANDS],
-[    ]m4_bpatsubst(AC_File, [:.*])[ ) $2 ;;
-])])])
-_AC_CONFIG_COMMANDS_INIT([$3])
-m4_divert_pop([KILL])dnl
+[AC_FOREACH([AC_File], [$1], [_AC_CONFIG_LINK(m4_defn([AC_File]), [$2])])dnl
+_AC_CONFIG_COMMANDS_INIT([$3])dnl
 ac_config_links="$ac_config_links m4_normalize([$1])"
-])dnl
+])
 
 
 # Initialize the list.
@@ -786,6 +796,20 @@
 ## --------------------- ##
 
 
+# _AC_CONFIG_FILE(FILE..., [COMMANDS])
+# ------------------------------------
+# See below.
+m4_define([_AC_CONFIG_FILE],
+[_AC_CONFIG_UNIQUE([$1])dnl
+m4_append([AC_LIST_FILES], [ $1])dnl
+_AC_CONFIG_DEPENDENCIES([$1])dnl
+dnl Register the commands.
+m4_ifval([$2],
+[m4_append([AC_LIST_FILES_COMMANDS],
+[    ]m4_bpatsubst([$1], [:.*])[ ) $2 ;;
+])])dnl
+])
+
 # AC_CONFIG_FILES(FILE..., [COMMANDS], [INIT-CMDS])
 # -------------------------------------------------
 # Specify output files, as with AC_OUTPUT, i.e., files that are
@@ -799,19 +823,10 @@
 #        AC_LIST_FILES_COMMANDS
 #      esac
 AC_DEFUN([AC_CONFIG_FILES],
-[m4_divert_push([KILL])
-_AC_CONFIG_UNIQUE([$1])
-_AC_CONFIG_DEPENDENCIES([$1])
-m4_append([AC_LIST_FILES], [ $1])
-dnl Register the commands.
-m4_ifval([$2], [AC_FOREACH([AC_File], [$1],
-[m4_append([AC_LIST_FILES_COMMANDS],
-[    ]m4_bpatsubst(AC_File, [:.*])[ ) $2 ;;
-])])])
-_AC_CONFIG_COMMANDS_INIT([$3])
-m4_divert_pop([KILL])dnl
+[AC_FOREACH([AC_File], [$1], [_AC_CONFIG_FILE(m4_defn([AC_File]), [$2])])dnl
+_AC_CONFIG_COMMANDS_INIT([$3])dnl
 ac_config_files="$ac_config_files m4_normalize([$1])"
-])dnl
+])
 
 # Initialize the lists.
 m4_define([AC_LIST_FILES])
Index: tests/torture.at
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/torture.at,v
retrieving revision 1.32
diff -u -u -r1.32 torture.at
--- tests/torture.at 6 Feb 2002 17:51:02 -0000 1.32
+++ tests/torture.at 3 Apr 2002 13:19:51 -0000
@@ -30,6 +30,19 @@
 ]])
 
 
+## -------------------------- ##
+## Multiple AC_CONFIG_FILES.  ##
+## -------------------------- ##
+
+AT_SETUP([Multiple AC_CONFIG_FILES])
+
+AT_CONFIGURE_AC([[AC_CONFIG_FILES([foo foo])]])
+AT_CHECK_AUTOCONF([], 1, [], [ignore])
+
+AT_CLEANUP
+
+
+
 ## ------------ ##
 ## AC_ARG_VAR.  ##
 ## ------------ ##



reply via email to

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