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 rebuild rules work even when AC_CONFIG_FILES uses colons.
|
---|
22 | # Report from Alexander Turbov.
|
---|
23 |
|
---|
24 | required=GNUmake
|
---|
25 | . ./defs || exit 1
|
---|
26 |
|
---|
27 | set -e
|
---|
28 |
|
---|
29 | cat >> configure.in << 'END'
|
---|
30 | AC_CONFIG_FILES([bar/Makefile:bar/Makefile.in:Makefile.bot])
|
---|
31 | AC_OUTPUT
|
---|
32 | END
|
---|
33 |
|
---|
34 | cat > Makefile.am << 'END'
|
---|
35 | SUBDIRS = bar
|
---|
36 | EXTRA_DIST = Makefile.bot
|
---|
37 | END
|
---|
38 |
|
---|
39 | mkdir bar
|
---|
40 | cat > bar/Makefile.am << 'END'
|
---|
41 | top-rule:
|
---|
42 | @echo 'top rule'
|
---|
43 | END
|
---|
44 |
|
---|
45 | cat > Makefile.bot << 'END'
|
---|
46 | bot-rule:
|
---|
47 | @echo 'bot rule'
|
---|
48 | END
|
---|
49 |
|
---|
50 | $ACLOCAL
|
---|
51 | $AUTOCONF
|
---|
52 | $AUTOMAKE
|
---|
53 | ./configure
|
---|
54 | $MAKE
|
---|
55 |
|
---|
56 | cd bar
|
---|
57 | $MAKE top-rule >stdout
|
---|
58 | cat stdout
|
---|
59 | grep 'top rule' stdout
|
---|
60 | $MAKE bot-rule >stdout
|
---|
61 | cat stdout
|
---|
62 | grep 'bot rule' stdout
|
---|
63 | cd ..
|
---|
64 |
|
---|
65 | $sleep
|
---|
66 |
|
---|
67 | cat > bar/Makefile.am << 'END'
|
---|
68 | top-rule:
|
---|
69 | @echo 'top2 rule'
|
---|
70 | END
|
---|
71 | $MAKE
|
---|
72 |
|
---|
73 | cd bar
|
---|
74 | $MAKE top-rule >stdout
|
---|
75 | cat stdout
|
---|
76 | grep 'top2 rule' stdout
|
---|
77 | $MAKE bot-rule >stdout
|
---|
78 | cat stdout
|
---|
79 | grep 'bot rule' stdout
|
---|
80 | cd ..
|
---|
81 |
|
---|
82 | $sleep
|
---|
83 |
|
---|
84 | cat > Makefile.bot << 'END'
|
---|
85 | bot-rule:
|
---|
86 | @echo 'bot2 rule'
|
---|
87 | END
|
---|
88 | $MAKE
|
---|
89 |
|
---|
90 | cd bar
|
---|
91 | $MAKE top-rule >stdout
|
---|
92 | cat stdout
|
---|
93 | grep 'top2 rule' stdout
|
---|
94 | $MAKE bot-rule >stdout
|
---|
95 | cat stdout
|
---|
96 | grep 'bot2 rule' stdout
|
---|
97 | cd ..
|
---|
98 |
|
---|
99 | $MAKE distcheck
|
---|