1 | #! /bin/sh
|
---|
2 | # Copyright (C) 2003 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 Automake; see the file COPYING. If not, write to
|
---|
18 | # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
---|
19 | # Boston, MA 02110-1301, USA.
|
---|
20 |
|
---|
21 | # Make sure an AC_CONFIG_FILES can have an AC_CONFIG_FILES output as input.
|
---|
22 | # This is comparable to output9.test, but testing Makefile rules.
|
---|
23 | # PR/411
|
---|
24 |
|
---|
25 | . ./defs || exit 1
|
---|
26 |
|
---|
27 | set -e
|
---|
28 |
|
---|
29 | cat >> configure.in << END
|
---|
30 | AC_SUBST([FOO], [top])
|
---|
31 | AC_SUBST([BAR], [bot])
|
---|
32 | AC_CONFIG_FILES([a/top])
|
---|
33 | AC_CONFIG_FILES([a/bot])
|
---|
34 | AC_CONFIG_FILES([b/Makefile:a/top:b/Makefile.in:a/bot])
|
---|
35 | AC_OUTPUT
|
---|
36 | END
|
---|
37 |
|
---|
38 | mkdir a
|
---|
39 | mkdir b
|
---|
40 |
|
---|
41 | cat >Makefile.am <<\EOF
|
---|
42 | SUBDIRS = b
|
---|
43 | dist-hook:
|
---|
44 | test ! -f $(distdir)/a/top
|
---|
45 | test ! -f $(distdir)/a/bot
|
---|
46 | EOF
|
---|
47 |
|
---|
48 | cat >b/Makefile.am <<\EOF
|
---|
49 | output:
|
---|
50 | echo $(TOP)$(BOT) > ok
|
---|
51 | EOF
|
---|
52 |
|
---|
53 | echo TOP=@FOO@ >a/top.in
|
---|
54 | echo BOT=@BAR@ >a/bot.in
|
---|
55 |
|
---|
56 | $ACLOCAL
|
---|
57 | $AUTOCONF
|
---|
58 | $AUTOMAKE
|
---|
59 |
|
---|
60 | mkdir build
|
---|
61 | cd build
|
---|
62 | ../configure
|
---|
63 | cd b
|
---|
64 | $MAKE output
|
---|
65 | grep topbot ok
|
---|
66 | cd ..
|
---|
67 | $MAKE distcheck
|
---|