1 | #! /bin/sh
|
---|
2 | # Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
---|
3 | #
|
---|
4 | # This file is part of GNU Automake.
|
---|
5 | #
|
---|
6 | # GNU Automake is free software; you can redistribute it and/or modify
|
---|
7 | # it under the terms of the GNU General Public License as published by
|
---|
8 | # the Free Software Foundation; either version 2, or (at your option)
|
---|
9 | # any later version.
|
---|
10 | #
|
---|
11 | # GNU Automake is distributed in the hope that it will be useful,
|
---|
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
14 | # GNU General Public License for more details.
|
---|
15 | #
|
---|
16 | # You should have received a copy of the GNU General Public License
|
---|
17 | # along with autoconf; see the file COPYING. If not, write to
|
---|
18 | # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
---|
19 | # Boston, MA 02111-1307, USA.
|
---|
20 |
|
---|
21 | # Test to make sure that adding a new directory works.
|
---|
22 | # PR automake/46
|
---|
23 |
|
---|
24 | # This test assumes that the `make' utility is able to start
|
---|
25 | # over and reload Makefiles which have been remade (a non-POSIX feature).
|
---|
26 | required='GNUmake gcc'
|
---|
27 | . ./defs || exit 1
|
---|
28 |
|
---|
29 | cat > configure.in << 'END'
|
---|
30 | AC_INIT(a.c)
|
---|
31 | AM_INIT_AUTOMAKE(maude, 1.0)
|
---|
32 | AM_PROG_CC_C_O
|
---|
33 | AC_PROG_CC
|
---|
34 | AC_OUTPUT(Makefile)
|
---|
35 | END
|
---|
36 |
|
---|
37 | cat > Makefile.am << 'END'
|
---|
38 | bin_PROGRAMS = wish
|
---|
39 | wish_SOURCES = a.c
|
---|
40 | END
|
---|
41 |
|
---|
42 | cat > a.c << 'END'
|
---|
43 | #include <stdio.h>
|
---|
44 | int main ()
|
---|
45 | {
|
---|
46 | printf ("hi liver!\n");
|
---|
47 | return 0;
|
---|
48 | }
|
---|
49 | END
|
---|
50 |
|
---|
51 | set -e
|
---|
52 |
|
---|
53 | $ACLOCAL
|
---|
54 | $AUTOCONF
|
---|
55 | $AUTOMAKE --include-deps --copy --add-missing
|
---|
56 | ./configure
|
---|
57 | $MAKE
|
---|
58 |
|
---|
59 | # Now add a new directory.
|
---|
60 | cat > configure.in << 'END'
|
---|
61 | AC_INIT(a.c)
|
---|
62 | AM_INIT_AUTOMAKE(maude, 1.0)
|
---|
63 | AM_PROG_CC_C_O
|
---|
64 | AC_PROG_CC
|
---|
65 | AC_OUTPUT(Makefile maude/Makefile)
|
---|
66 | END
|
---|
67 |
|
---|
68 | mkdir maude
|
---|
69 | cat > maude/Makefile.am << 'END'
|
---|
70 | include_HEADERS = foo.h
|
---|
71 | END
|
---|
72 |
|
---|
73 | : > maude/foo.h
|
---|
74 |
|
---|
75 | echo 'SUBDIRS = maude' >> Makefile.am
|
---|
76 |
|
---|
77 | # We want a simple rebuild to create maude/Makefile automatically.
|
---|
78 | $MAKE
|
---|