Merge branch 'msvc' into maint
[platform/upstream/automake.git] / tests / output7.test
1 #! /bin/sh
2 # Copyright (C) 2003  Free Software Foundation, Inc.
3 #
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)
7 # any later version.
8 #
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.
13 #
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/>.
16
17 # Check for support for colon separated input files in AC_CONFIG_FILES,
18 # with sources in sub directories.
19
20 . ./defs || Exit 1
21
22 set -e
23
24 cat > configure.in << END
25 AC_INIT([$me], [1.0])
26 AM_INIT_AUTOMAKE
27 AC_CONFIG_FILES([
28   Makefile:mk/toplevel.in
29   sub/Makefile:mk/sub.in
30   mk/Makefile
31 ])
32 AC_OUTPUT
33 END
34
35 mkdir mk sub
36 cat >mk/Makefile.am <<'EOF'
37 all-local:
38         @echo in--mk
39 EOF
40
41 cat >mk/sub.am <<'EOF'
42 EXTRA_DIST = foo
43 all-local:
44         @echo in--sub
45 EOF
46
47 cat >mk/toplevel.am <<'EOF'
48 all-local:
49         @echo at--toplevel
50 SUBDIRS = mk sub
51 EOF
52
53 # We have to distribute something in foo, because some versions
54 # of tar do not archive empty directories when passed the `o'
55 # flags.  (This was fixed in GNU tar 1.12, but older
56 # versions are still used: NetBSD 1.6.1 ships with tar 1.11.2).
57 #
58 # If sub/ is missing from the archive, config.status will fail
59 # to compute $ac_abs_srcdir during a VPATH build: config.status
60 # is able to create sub/ in the build tree, but it assumes the
61 # directory already exists in the source tree.
62 echo bar > sub/foo
63
64 $ACLOCAL
65 $AUTOCONF
66 $AUTOMAKE
67 ./configure
68 $MAKE >output
69 cat output
70 grep in--mk output
71 grep in--sub output
72 grep at--toplevel output
73
74 $MAKE distcheck