630e99241d3848f9107442d24bf7bda4186b332a
[platform/upstream/automake.git] / tests / colon3.test
1 #! /bin/sh
2
3 # Make sure ":" works with files automake generates.
4 # This test is for multiple ":"s.
5
6 . $srcdir/defs || exit 1
7
8 cat > configure.in << 'END'
9 AC_INIT
10 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
11 AC_OUTPUT(Makefile:zardoz.in:two.in:three.in)
12 END
13
14 : > zardoz.am
15 : > two.in
16 : > three.in
17
18 $ACLOCAL || exit 1
19 $AUTOMAKE || exit 1
20
21 # We actually check several things here.
22 # Automake should have created zardoz.in.
23 test -f zardoz.in || exit 1
24
25 # The generated file should refer to zardoz.in and zardoz.am, but
26 # never just "zardoz" -- except the actual automake invocation can
27 # refer to it (don't ask).
28 echo Grep1
29 grep zardoz zardoz.in | $FGREP -v 'zardoz.in' | $FGREP -v 'zardoz.am' \
30    | $FGREP -v AUTOMAKE > O
31 # We cat the output file so we see in when verbose.
32 cat O
33 test -z "`cat O`" || exit 1
34
35 # Makefile should depend on two.in.
36 echo Grep2
37 grep '^Makefile:.* two.in' zardoz.in || exit 1
38 # Likewise three.in.
39 echo Grep3
40 grep '^Makefile:.* three.in' zardoz.in