2 # Copyright (C) 1996-2013 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 # Make sure ":" works with files automake generates.
18 # This test is for multiple ":"s.
19 # See also sister test 'colon2.sh'.
23 cat > configure.ac <<END
26 AC_CONFIG_FILES([Makefile:zardoz.in:two.in:three.in])
41 # Automake should have created zardoz.in.
44 # The generated file should refer to zardoz.in and zardoz.am, but
45 # never just "zardoz".
46 $FGREP 'zardoz.am' zardoz.in
47 $FGREP 'zardoz.in' zardoz.in
48 sed -e 's|zardoz\.am|zrdz.am|g' \
49 -e 's|zardoz\.in|zrdz.in|g' \
50 <zardoz.in | $FGREP 'zardoz' && exit 1
52 # The configure-generated Makefile should depend on zardoz.in, two.in and
53 # three.in. The automake-generated zardoz.in should depend on zardoz.am.
54 # Let's do this check the right way by running configure and make.
62 test -f Makefile # Sanity check.
65 # Again, make sure that the generated Makefile do not unduly
67 $MAKE -n zardoz && exit 1
70 cat >> zardoz.am <<END
71 check-local: testam testin testmk test2 test3
72 .PHONY: testam testin test2 testmk test3
74 grep '$str' \$(srcdir)/zardoz.am
76 grep '$str' \$(srcdir)/zardoz.in
80 grep '$str2' \$(srcdir)/two.in
82 grep '$str3' \$(srcdir)/three.in
84 echo "# $str2" >> two.in
85 echo "# $str3" >> three.in
86 $MAKE Makefile # For non-GNU make.
87 $MAKE testam testin testmk test2 test3