[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.10b-37-
From: |
Ralf Wildenhues |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.10b-37-gc5635fa |
Date: |
Sun, 19 Apr 2009 07:59:54 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=c5635fa68f25ea688578daed8ac503b718761206
The branch, master has been updated
via c5635fa68f25ea688578daed8ac503b718761206 (commit)
from ef895abce45ac34eddff347c4507c73155f28e07 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c5635fa68f25ea688578daed8ac503b718761206
Author: Ralf Wildenhues <address@hidden>
Date: Sun Apr 19 02:19:20 2009 +0200
Correctly treat all assignments with bogus trailing comments.
Before this patch, automake would silently fail to diagnose and
to copy into the output those variable assignments which are
preceded by a comment, and end in backslash newline comment.
* automake.in (read_am_file): When determining whether an
escaped newline followed by a comment is an error, correctly use
the parser state, not the contents of a saved comment, which
could still be carried over from a comment before an assignment.
* NEWS: Update.
* tests/commen11.test: New test.
* tests/Makefile.am: Update.
Report by Karl Berry.
Signed-off-by: Ralf Wildenhues <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 15 +++++++++++++++
NEWS | 5 +++++
automake.in | 2 +-
tests/Makefile.am | 1 +
tests/Makefile.in | 1 +
tests/{commen10.test => commen11.test} | 16 ++++++++++++----
6 files changed, 35 insertions(+), 5 deletions(-)
copy tests/{commen10.test => commen11.test} (66%)
diff --git a/ChangeLog b/ChangeLog
index 15adab4..8be052c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2009-04-19 Ralf Wildenhues <address@hidden>
+
+ Correctly treat all assignments with bogus trailing comments.
+ Before this patch, automake would silently fail to diagnose and
+ to copy into the output those variable assignments which are
+ preceded by a comment, and end in backslash newline comment.
+ * automake.in (read_am_file): When determining whether an
+ escaped newline followed by a comment is an error, correctly use
+ the parser state, not the contents of a saved comment, which
+ could still be carried over from a comment before an assignment.
+ * NEWS: Update.
+ * tests/commen11.test: New test.
+ * tests/Makefile.am: Update.
+ Report by Karl Berry.
+
2009-04-14 Karl Berry <address@hidden>
manual: improve markup: itemize list in `Extending'.
diff --git a/NEWS b/NEWS
index 2c69e46..e806cf6 100644
--- a/NEWS
+++ b/NEWS
@@ -40,6 +40,11 @@ Bugs fixed in 1.10c:
- Renamed objects also work with the `subdir-objects' option and
source file languages which Automake does not know itself.
+ - `automake' now correctly complains about variable assignments which are
+ preceded by a comment, extend over multiple lines with backslash-escaped
+ newlines, and end in a comment sign. Previous versions would silently
+ and wrongly ignore such assignments completely.
+
* Bugs introduced by 1.10:
- The `parallel-tests' driver also works on systems with a nonempty
diff --git a/automake.in b/automake.in
index d494907..fe2ff3d 100755
--- a/automake.in
+++ b/automake.in
@@ -6704,7 +6704,7 @@ sub read_am_file ($$)
elsif (/$COMMENT_PATTERN/o)
{
error $where, "comment following trailing backslash"
- if $saw_bk && $comment eq '';
+ if $saw_bk && $prev_state != IN_COMMENT;
# Stick comments before the incoming macro or rule.
$comment .= $spacing . $_;
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c36237e..093dde5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -137,6 +137,7 @@ comment7.test \
comment8.test \
comment9.test \
commen10.test \
+commen11.test \
compile.test \
compile2.test \
compile_f90_c_cxx.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index b339664..54422bf 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -369,6 +369,7 @@ comment7.test \
comment8.test \
comment9.test \
commen10.test \
+commen11.test \
compile.test \
compile2.test \
compile_f90_c_cxx.test \
diff --git a/tests/commen10.test b/tests/commen11.test
similarity index 66%
copy from tests/commen10.test
copy to tests/commen11.test
index 762920a..7596723 100755
--- a/tests/commen10.test
+++ b/tests/commen11.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2009 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
@@ -14,14 +14,20 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure comments following trailing backslashes are diagnosed.
-# Report from Harald Dunkel.
+# Make sure backslash-newline-hash combinations are diagnosed as
+# comments following a trailing backslash, even when the combination
+# follows a variable assignment that is preceded by a comment.
. ./defs || Exit 1
set -e
cat > Makefile.am << 'END'
+# initial comment
+variable = value-before-comment \
+#
+
+# comment
SUBDIRS = foo \
# bar
@@ -31,4 +37,6 @@ mkdir foo
$ACLOCAL
AUTOMAKE_fails
-grep backslash stderr
+grep 3.*backslash stderr
+grep 7.*backslash stderr
+:
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.10b-37-gc5635fa,
Ralf Wildenhues <=