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):
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
}
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)
--- /dev/null
+#! /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