2 # Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
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)
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.
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/>.
17 # Test to make sure that adding a new directory works.
18 # This test runs `make' from the top-level directory, subdir8.test
19 # do it from a subdirectory.
22 # This test assumes that the `make' utility is able to start
23 # over and reload Makefiles which have been remade (a non-POSIX feature).
24 required
='GNUmake gcc'
29 cat > configure.
in << 'END'
33 AC_CONFIG_FILES
(Makefile
)
37 cat > Makefile.am
<< 'END'
46 printf ("hi liver!\n");
53 $AUTOMAKE --include-deps --copy --add-missing
57 # Now add a new directory.
58 cat > configure.
in << 'END'
63 AC_CONFIG_FILES
(Makefile maude
/Makefile
)
64 m4_include
([confile.
m4])
71 cat > maude
/Makefile.am
<< 'END'
72 include_HEADERS
= foo.h
77 echo 'SUBDIRS = maude' >> Makefile.am
79 # We want a simple rebuild to create maude/Makefile automatically.
81 test -f maude
/Makefile
83 # Add yet another directory
85 echo 'AC_CONFIG_FILES([maude2/Makefile])AC_SUBST([GREPME])' > confile.
m4
86 : > maude
2/Makefile.am
87 echo 'SUBDIRS += maude2' >> Makefile.am
89 # We want a simple rebuild to create maude2/Makefile and update
90 # all other Makefiles automatically.
93 grep GREPME maude
/Makefile
94 grep GREPME maude
2/Makefile