Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / tests / cond38.test
blob0cf3c26da36628f1d5bb7cee2f1837eca0614ca7
1 #!/bin/sh
2 # Copyright (C) 2005 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 3, or (at your option)
7 # any later version.
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 # Check conditional variable ordering.
18 # Report from Ed Hartnett.
20 . ./defs
22 set -e
24 cat >>configure.in <<'EOF'
25 AM_CONDITIONAL([CASE_A], :)
26 AM_CONDITIONAL([CASE_B], :)
27 AC_OUTPUT
28 EOF
30 cat >>Makefile.am <<'EOF'
31 SUBDIRS = a
32 if CASE_A
33 SUBDIRS += b
34 endif
35 SUBDIRS += c
36 if CASE_A
37 SUBDIRS += d
38 if CASE_B
39 SUBDIRS += e
40 endif
41 SUBDIRS += f
42 endif
43 SUBDIRS += g
44 if CASE_B
45 SUBDIRS += h
46 endif
47 if CASE_B
48 SUBDIRS += iXYZ
49 SUBDIRS += jZYX
50 endif
51 print:
52 @echo BEG: $(SUBDIRS) :END
53 EOF
55 mkdir a b c d e f g h iXYZ jZYX
57 $ACLOCAL
58 $AUTOCONF
59 $AUTOMAKE
61 ./configure
62 $MAKE print >stdout
63 cat stdout
64 # Check good ordering
65 grep 'BEG: a b c d e f g h iXYZ jZYX :END' stdout
66 # Make sure no extra variable was created for the last 3 items.
67 grep 'append.*=.* h iXYZ jZYX' Makefile