From: Alexandre Duret-Lutz Date: Thu, 30 Jun 2005 21:19:48 +0000 (+0000) Subject: * automake.in (read_am_file): Correctly diagnose comments following X-Git-Tag: Release-1-9b~139 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16f98f9d629d9ca515984aae31dd0130007260da;p=thirdparty%2Fautomake.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 518517320..852cbd52d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2005-06-30 Alexandre Duret-Lutz + * 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 89a3856d9..4f65f8fa0 100644 --- 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 diff --git a/automake.in b/automake.in index b64191cd6..3ea78e5b8 100755 --- a/automake.in +++ b/automake.in @@ -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) diff --git a/tests/Makefile.am b/tests/Makefile.am index 62e11dbf4..986d33b1e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 11c0674ab..4931522f1 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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 index 000000000..76767dd9c --- /dev/null +++ b/tests/commen10.test @@ -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