Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / tests / comment5.test
blob713dbb1853b066bcadb3397d37a6bedb83014f53
1 #! /bin/sh
2 # Copyright (C) 2002, 2003 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 3, or (at your option)
7 # any later version.
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/>.
17 # Test for PR/280.
18 # (Automake should complain about trailing backslashes in comments.)
20 . ./defs || Exit 1
22 set -e
24 cat >> configure.in <<'EOF'
25 AC_OUTPUT
26 EOF
28 cat > Makefile.am << 'EOF'
29 all-local:
30 @echo ${var}
32 # a comment with backslash \
35 var = foo
36 EOF
38 $ACLOCAL
39 AUTOMAKE_fails
40 grep '^Makefile.am:5: blank line following trailing backslash' stderr
43 ## Here is a second test because head comments are
44 ## handled differently in Automake 1.5.
46 cat > Makefile.am << 'EOF'
47 # a comment with backslash \
50 all-local:
51 @echo ${var}
53 var = foo
54 EOF
56 AUTOMAKE_fails
57 grep '^Makefile.am:2: blank line following trailing backslash' stderr
60 ## Make sure we print an 'included' stack on errors.
62 echo 'include Makefile.inc'> Makefile.am
63 cat > Makefile.inc << 'EOF'
64 # a comment with backslash \
66 EOF
68 AUTOMAKE_fails
69 grep '^Makefile.inc:2: blank line following trailing backslash' stderr
70 grep '^Makefile.am:1: .*included from here' stderr
73 ## Make sure backslashes are still allowed within a comment.
74 ## This usually happens when commenting out a Makefile rule.
76 cat > Makefile.am << 'EOF'
77 all-local:
78 @echo ${var}
80 # a comment with backslash \
81 # but terminated by a line without backslash
83 var = foo
84 EOF
86 $AUTOMAKE