From: Alexandre Duret-Lutz Date: Tue, 3 Dec 2002 18:00:21 +0000 (+0000) Subject: For PR automake/379: X-Git-Tag: Release-1-7-2b~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62e419482066a0d4d2ec56951cf9eae020215352;p=thirdparty%2Fautomake.git For PR automake/379: * automake.in (read_am_file): Do not complain about backslashes before blank lines when the backslash is in a comment. * tests/Makefile.am (TESTS): Add comment8.test. * tests/comment8.test: New file. --- diff --git a/ChangeLog b/ChangeLog index 780dddb19..d2b748bc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2002-12-03 Alexandre Duret-Lutz + + For PR automake/379: + * automake.in (read_am_file): Do not complain about backslashes + before blank lines when the backslash is in a comment. + * tests/Makefile.am (TESTS): Add comment8.test. + * tests/comment8.test: New file. + 2002-12-02 Charles Wilson * tests/gnits3.test (AM_INSTALLCHECK_STD_OPTIONS_EXEMPT): diff --git a/automake.in b/automake.in index 7f3efc481..872e7b4ef 100755 --- a/automake.in +++ b/automake.in @@ -7628,7 +7628,7 @@ sub read_am_file ($$) elsif (/$WHITE_PATTERN/o) { err $where, "blank line following trailing backslash" - if $saw_bk; + if $saw_bk && $prev_state != IN_COMMENT; # Stick a single white line before the incoming macro or rule. $spacing = "\n"; $blank = 1; @@ -7691,7 +7691,7 @@ sub read_am_file ($$) # Stick a single white line before the incoming macro or rule. $spacing = "\n"; err $where, "blank line following trailing backslash" - if $saw_bk; + if $saw_bk && $prev_state != IN_COMMENT; } elsif (/$COMMENT_PATTERN/o) { diff --git a/tests/Makefile.am b/tests/Makefile.am index afa1c802a..70206d71d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -70,6 +70,7 @@ comment4.test \ comment5.test \ comment6.test \ comment7.test \ +comment8.test \ compile_f_c_cxx.test \ cond.test \ cond2.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 3144f2ca6..11affd349 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -163,6 +163,7 @@ comment4.test \ comment5.test \ comment6.test \ comment7.test \ +comment8.test \ compile_f_c_cxx.test \ cond.test \ cond2.test \ diff --git a/tests/comment8.test b/tests/comment8.test new file mode 100755 index 000000000..b79783190 --- /dev/null +++ b/tests/comment8.test @@ -0,0 +1,47 @@ +#! /bin/sh +# Copyright (C) 2002 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 autoconf; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# Test for PR/379. Do not print `blank line following trailing backslash' +# when the backslash is in a comment. People find this natural to comment +# out part of backslashed blocks this way. + +. ./defs || exit 1 + +set -e + +echo AC_PROG_CC >> configure.in + +cat > Makefile.am << 'EOF' +# foo \ + +test_SOURCES = a.c \ + c.c +# b.c \ + +bin_PROGRAMS = test \ + foo \ + baz +# bar \ + +EXTRA_DIST = mumble +EOF + +$ACLOCAL +$AUTOMAKE