2 # Copyright (C) 2011 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/>.
17 # Check that errors about AUTOMAKE_OPTIONS refers to correct
22 cat > Makefile.am
<<'END'
28 cat > Makefile0.am
<<'END'
35 cat > Makefile1.am
<<'END'
36 AUTOMAKE_OPTIONS = tar-pax
40 cat > Makefile2.am
<<'END'
46 AUTOMAKE_OPTIONS = tar-ustar
49 cat > Makefile3.am
<<'END'
53 AUTOMAKE_OPTIONS += tar-v7
57 cat >>configure.
in <<'END'
58 AC_CONFIG_FILES([Makefile2 Makefile3])
62 # Automake options 'tar-v7', 'tar-ustar' and 'tar-pax' can only be used
63 # as argument to AM_INIT_AUTOMAKE, and not in AUTOMAKE_OPTIONS.
66 # Check that all the expected line numbers are correctly reported
67 # in automake warning/error messages.
68 grep '^Makefile1\.am:1:.*tar-pax' stderr
69 grep '^Makefile2\.am:6:.*tar-ustar' stderr
70 grep '^Makefile3\.am:2:.*tar-v7' stderr
71 grep '^Makefile\.am:3:.*Makefile0\.am.*included from here' stderr
72 grep '^Makefile0\.am:4:.*Makefile1\.am.*included from here' stderr
74 # And also check that no botched line number is reported.
76 |
grep -v '^Makefile\.am:3:' \
77 |
grep -v '^Makefile0\.am:4:' \
78 |
grep -v '^Makefile1\.am:1:' \
79 |
grep -v '^Makefile2\.am:6:' \
80 |
grep -v '^Makefile3\.am:2:' \