]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* automake.in (read_am_file): Correctly diagnose comments following
authorAlexandre Duret-Lutz <adl@gnu.org>
Thu, 30 Jun 2005 21:19:48 +0000 (21:19 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Thu, 30 Jun 2005 21:19:48 +0000 (21:19 +0000)
trailing backslash.
* tests/commen10.test: New file.
* tests/Makefile.am (TESTS): Add commen10.test.
Report from Harald Dunkel.

ChangeLog
THANKS
automake.in
tests/Makefile.am
tests/Makefile.in
tests/commen10.test [new file with mode: 0755]

index 518517320d48f850ea850832e20716bcc02d15a3..852cbd52d29d9147aa57a45d648eafc38a9a4ec1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2005-06-30  Alexandre Duret-Lutz  <adl@gnu.org>
 
+       * automake.in (read_am_file): Correctly diagnose comments following
+       trailing backslash.
+       * tests/commen10.test: New file.
+       * tests/Makefile.am (TESTS): Add commen10.test.
+       Report from Harald Dunkel.
+
        * automake.in (scan_autoconf_traces): Scan AC_SUBST_TRACE instead
        of AC_SUBST.
        * lib/am/header-vars.am (srcdir, top_srcdir, top_builddir, INSTALL):
diff --git a/THANKS b/THANKS
index 89a3856d99a95087eaaaf2f606dc15cc14372dd4..4f65f8fa026a6108b8c79bcbe35bcbc65ca7b561 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -88,6 +88,7 @@ Gustavo Carneiro      gjc@inescporto.pt
 Gwenole Beauchesne      gbeauchesne@mandrakesoft.com
 H.J. Lu                        hjl@lucon.org
 H.Merijn Brand         h.m.brand@hccnet.nl
+Harald Dunkel          harald@CoWare.com
 Harlan Stenn           Harlan.Stenn@pfcs.com
 He Li                          tippa000@yahoo.com
 Henrik Frystyk Nielsen frystyk@w3.org
index b64191cd67531ad4652a8f1653d59e095e8ef4ad..3ea78e5b8d7c8f0caab8610326374de175599d95 100755 (executable)
@@ -6068,11 +6068,12 @@ sub read_am_file ($$)
        }
        elsif (/$COMMENT_PATTERN/o)
        {
+           error $where, "comment following trailing backslash"
+             if $saw_bk && $comment eq '';
+
            # Stick comments before the incoming macro or rule.
            $comment .= $spacing . $_;
            $spacing = '';
-           error $where, "comment following trailing backslash"
-             if $saw_bk && $comment eq '';
            $prev_state = IN_COMMENT;
        }
        elsif ($saw_bk)
index 62e11dbf46f852fee261981b06cae406b5ac073f..986d33b1e0f86f55a687a64604246d968a9c33d2 100644 (file)
@@ -99,6 +99,7 @@ comment6.test \
 comment7.test \
 comment8.test \
 comment9.test \
+commen10.test \
 compile.test \
 compile_f90_c_cxx.test \
 compile_f_c_cxx.test \
index 11c0674abdfb700348a1da2ada4206bcd5025d34..4931522f1dc95de86da8cf8f629299957a103243 100644 (file)
@@ -230,6 +230,7 @@ comment6.test \
 comment7.test \
 comment8.test \
 comment9.test \
+commen10.test \
 compile.test \
 compile_f90_c_cxx.test \
 compile_f_c_cxx.test \
diff --git a/tests/commen10.test b/tests/commen10.test
new file mode 100755 (executable)
index 0000000..76767dd
--- /dev/null
@@ -0,0 +1,38 @@
+#! /bin/sh
+# Copyright (C) 2005  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Make sure comments following trailing backslashes are diagnosed.
+# Report from Harald Dunkel.
+
+. ./defs || exit 1
+
+set -e
+
+cat > Makefile.am << 'END'
+SUBDIRS = foo \
+# bar
+
+END
+
+mkdir foo
+
+$ACLOCAL
+AUTOMAKE_fails
+grep backslash stderr