Merge branch 'msvc' into maint
[platform/upstream/automake.git] / tests / colon3.test
1 #! /bin/sh
2 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2010 Free Software
3 # Foundation, Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
8 # any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18 # Make sure ":" works with files automake generates.
19 # This test is for multiple ":"s.
20
21 . ./defs || Exit 1
22
23 set -e
24
25 cat > configure.in <<END
26 AC_INIT([$me], [1.0])
27 AM_INIT_AUTOMAKE
28 AC_CONFIG_FILES([Makefile:zardoz.in:two.in:three.in])
29 AC_OUTPUT
30 END
31
32 : > zardoz.am
33 : > two.in
34 : > three.in
35
36 $ACLOCAL
37 $AUTOMAKE
38
39 # Automake should have created zardoz.in.
40 test -f zardoz.in
41
42 # The generated file should refer to zardoz.in and zardoz.am, but
43 # never just "zardoz".
44 sed -e 's|zardoz\.am|zrdz.am|g' \
45     -e 's|zardoz\.in|zrdz.in|g' \
46   <zardoz.in | $FGREP 'zardoz' && Exit 1
47
48 # FIXME: Do something like this after planned enahncements to tests/defs.
49 # FIXME: Or even do proper functional testing.
50 ## Also, Makefile should depend on two.in and three.in.
51 # extract_makefile_deps Makefile zardoz.in > deps
52 #$FGREP ' $(srcdir)/two.in ' deps
53 #$FGREP ' $(srcdir)/three.in ' deps
54 #
55 # FIXME: for the moment, we content ourselves with these inferior tests.
56 # Makefile should depend on two.in.
57 grep '^Makefile:.* \$(srcdir)/two.in' zardoz.in
58 # Likewise three.in.
59 grep '^Makefile:.* \$(srcdir)/three.in' zardoz.in
60
61 :