* INSTALL, lib/INSTALL, lib/config-ml.in, lib/config.guess,
[automake/plouj.git] / tests / conff.test
blob214e5b3d2cacf156d57e466972a144160fb47f2a
1 #! /bin/sh
2 # Copyright (C) 2003 Free Software Foundation, Inc.
4 # This file is part of GNU Automake.
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 3, or (at your option)
9 # any later version.
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.
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.
21 # Make sure rebuild rules work even when AC_CONFIG_FILES uses colons.
22 # Report from Alexander Turbov.
24 required=GNUmake
25 . ./defs || exit 1
27 set -e
29 cat >> configure.in << 'END'
30 AC_CONFIG_FILES([bar/Makefile:bar/Makefile.in:Makefile.bot])
31 AC_OUTPUT
32 END
34 cat > Makefile.am << 'END'
35 SUBDIRS = bar
36 EXTRA_DIST = Makefile.bot
37 END
39 mkdir bar
40 cat > bar/Makefile.am << 'END'
41 top-rule:
42 @echo 'top rule'
43 END
45 cat > Makefile.bot << 'END'
46 bot-rule:
47 @echo 'bot rule'
48 END
50 $ACLOCAL
51 $AUTOCONF
52 $AUTOMAKE
53 ./configure
54 $MAKE
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 ..
65 $sleep
67 cat > bar/Makefile.am << 'END'
68 top-rule:
69 @echo 'top2 rule'
70 END
71 $MAKE
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 ..
82 $sleep
84 cat > Makefile.bot << 'END'
85 bot-rule:
86 @echo 'bot2 rule'
87 END
88 $MAKE
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 ..
99 $MAKE distcheck