source: trunk/essentials/sys-devel/automake-1.7/tests/subdir5.test

Last change on this file was 3120, checked in by bird, 18 years ago

automake 1.7.9

File size: 1.8 KB
Line 
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).
26required='GNUmake gcc'
27. ./defs || exit 1
28
29cat > configure.in << 'END'
30AC_INIT(a.c)
31AM_INIT_AUTOMAKE(maude, 1.0)
32AM_PROG_CC_C_O
33AC_PROG_CC
34AC_OUTPUT(Makefile)
35END
36
37cat > Makefile.am << 'END'
38bin_PROGRAMS = wish
39wish_SOURCES = a.c
40END
41
42cat > a.c << 'END'
43#include <stdio.h>
44int main ()
45{
46 printf ("hi liver!\n");
47 return 0;
48}
49END
50
51set -e
52
53$ACLOCAL
54$AUTOCONF
55$AUTOMAKE --include-deps --copy --add-missing
56./configure
57$MAKE
58
59# Now add a new directory.
60cat > configure.in << 'END'
61AC_INIT(a.c)
62AM_INIT_AUTOMAKE(maude, 1.0)
63AM_PROG_CC_C_O
64AC_PROG_CC
65AC_OUTPUT(Makefile maude/Makefile)
66END
67
68mkdir maude
69cat > maude/Makefile.am << 'END'
70include_HEADERS = foo.h
71END
72
73: > maude/foo.h
74
75echo 'SUBDIRS = maude' >> Makefile.am
76
77# We want a simple rebuild to create maude/Makefile automatically.
78$MAKE
Note: See TracBrowser for help on using the repository browser.