summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--THANKS1
-rw-r--r--m4/cond.m46
-rwxr-xr-xtests/condd.test8
-rwxr-xr-xtests/pr220.test23
5 files changed, 30 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index bab7bafc3..de8f2cc15 100644
--- 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 f90535755..dd2558971 100644
--- 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
diff --git a/m4/cond.m4 b/m4/cond.m4
index 5887388f3..1394121eb 100644
--- a/m4/cond.m4
+++ b/m4/cond.m4
@@ -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])])
diff --git a/tests/condd.test b/tests/condd.test
index a05839efb..67318df3e 100755
--- a/tests/condd.test
+++ b/tests/condd.test
@@ -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
diff --git a/tests/pr220.test b/tests/pr220.test
index 3384dd2bd..2933a058a 100755
--- a/tests/pr220.test
+++ b/tests/pr220.test
@@ -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