* m4/cond.m4 (AM_CONDITIONAL): Double-quote diagnostic.
authorAlexandre Duret-Lutz <adl@gnu.org>
Mon, 17 May 2004 20:19:35 +0000 (20:19 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Mon, 17 May 2004 20:19:35 +0000 (20:19 +0000)
* tests/condd.test: Define a macro with the same name as a
conditional.
* tests/pr220.test: Modernize, and make sure the diagnostics
contains the macro name.
Report from Volker Boerchers.

ChangeLog
THANKS
m4/cond.m4
tests/condd.test
tests/pr220.test

index bab7baf..de8f2cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-05-17  Alexandre Duret-Lutz  <adl@gnu.org>
+
+       * m4/cond.m4 (AM_CONDITIONAL): Double-quote diagnostic.
+       * tests/condd.test: Define a macro with the same name as a
+       conditional.
+       * tests/pr220.test: Modernize, and make sure the diagnostics
+       contains the macro name.
+       Report from Volker Boerchers.
+
 2004-05-16  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * lib/texinfo.tex: New upstream version.
diff --git a/THANKS b/THANKS
index f905357..dd25589 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -252,6 +252,7 @@ Tom Epperly         tepperly@llnl.gov
 Ulrich Drepper         drepper@gnu.ai.mit.edu
 Václav Haisman         V.Haisman@sh.cvut.cz
 Vadim Zeitlin          Vadim.zeitlin@dptmaths.ens-cachan.fr
+Volker Boerchers       vboerchers@tecon.de
 Werner John            john@oswf.de
 Werner Koch            wk@isil.d.shuttle.de
 William S Fulton       wsf@fultondesigns.co.uk
index 5887388..1394121 100644 (file)
@@ -1,6 +1,6 @@
 # AM_CONDITIONAL                                              -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -37,6 +37,6 @@ else
 fi
 AC_CONFIG_COMMANDS_PRE(
 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.])
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
 fi])])
index a05839e..67318df 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -26,7 +26,10 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
-AM_CONDITIONAL(COND1, false)
+dnl Define a macro with the same name as the conditional to exhibit
+dnl any underquotted bug.
+AC_DEFUN([COND1], ["some'meaningless;characters`])
+AM_CONDITIONAL([COND1], false)
 AC_CONFIG_FILES([foo/Makefile])
 AC_CONFIG_FILES([bar/Makefile])
 AC_OUTPUT
@@ -65,6 +68,7 @@ mkdir foo bar
 
 $ACLOCAL
 $AUTOCONF
+grep "meaningless;characters" configure && exit 1
 $AUTOMAKE
 ./configure
 $MAKE test
index 3384dd2..2933a05 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -23,6 +23,8 @@
 required=gcc
 . ./defs || exit 1
 
+set -e
+
 cat >main.c <<EOF
 int main() { return 0; }
 EOF
@@ -36,9 +38,7 @@ bin_PROGRAMS = main
 main_SOURCES = main.c $(NEVER_DEFINED)
 EOF
 
-cat > configure.in << 'EOF'
-AC_INIT(main.c)
-AM_INIT_AUTOMAKE(test_am, 1.0)
+cat >> configure.in << 'EOF'
 AC_PROG_CC
 AC_ARG_ENABLE(foo,
 [  --enable-foo          Enable foo],
@@ -48,18 +48,17 @@ AC_ARG_ENABLE(foo,
     AM_CONDITIONAL(NEVER_TRUE, false)
   fi
 ])
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 EOF
 
-touch README NEWS AUTHORS ChangeLog
-
 mkdir build
 
-$ACLOCAL \
-   && $AUTOCONF \
-   && $AUTOMAKE -a || exit 1
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
 
 cd build
 # configure should fail since we've done something invalid.
-../configure && exit 1
-exit 0
+../configure 2>stderr && exit 1
+cat stderr
+grep NEVER_TRUE stderr