2 # Copyright (C) 2002-2012 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # (Automake should complain about trailing backslashes in comments.)
22 cat >> configure.ac <<'EOF'
26 cat > Makefile.am << 'EOF'
30 # a comment with backslash \
38 grep '^Makefile.am:5: error: blank line following trailing backslash' stderr
41 ## Here is a second test because head comments are
42 ## handled differently in Automake 1.5.
44 cat > Makefile.am << 'EOF'
45 # a comment with backslash \
55 grep '^Makefile.am:2: error: blank line following trailing backslash' stderr
58 ## Make sure we print an 'included' stack on errors.
60 echo 'include Makefile.inc'> Makefile.am
61 cat > Makefile.inc << 'EOF'
62 # a comment with backslash \
67 grep '^Makefile.inc:2: error: blank line following trailing backslash' stderr
68 grep '^Makefile.am:1: .*included from here' stderr
69 grep -v '^Makefile.am:1: .*error:' stderr
72 ## Make sure backslashes are still allowed within a comment.
73 ## This usually happens when commenting out a Makefile rule.
75 cat > Makefile.am << 'EOF'
79 # a comment with backslash \
80 # but terminated by a line without backslash