Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / tests / cond40.test
blobb6408cade6b7bccb2c6a6d93e8179a5422c60393
1 #!/bin/sh
2 # Copyright (C) 2008 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 # Test AM_COND_IF.
23 . ./defs
24 set -e
26 cat >>configure.in <<'END'
27 AC_DEFUN([FOO],
28 [AC_CONFIG_FILES([$1])])
30 AM_CONDITIONAL([COND], [test "$cond" = yes])
31 AM_COND_IF([COND],
32 [AC_CONFIG_FILES([file1])])
34 AM_CONDITIONAL([COND1], [test "$cond1" = yes])
35 AM_CONDITIONAL([COND2], [test "$cond2" = yes])
36 AM_CONDITIONAL([COND3], [test "$cond3" = yes])
38 AM_COND_IF([COND1],
39 [AM_COND_IF([COND2], [FOO([file2])],
40 [AM_COND_IF([COND3],
41 [FOO([file3])])])])
43 AC_OUTPUT
44 END
46 : >Makefile.am
47 : >file1.in
48 : >file2.in
49 : >file3.in
51 $ACLOCAL
52 $AUTOCONF
53 $AUTOMAKE -a
55 ./configure cond=yes cond1=yes cond2=no cond3=yes
56 test -f file1
57 test ! -f file2
58 test -f file3
59 rm -f file1 file3
60 $MAKE file1 file3
61 $MAKE file2 && Exit 1
62 test -f file1
63 test ! -f file2
64 test -f file3
65 $MAKE distclean
67 ./configure cond=no cond1=yes cond2=yes
68 test ! -f file1
69 test -f file2
70 test ! -f file3
71 rm -f file2
72 $MAKE file1 && Exit 1
73 $MAKE file2
74 $MAKE file3 && Exit 1
75 test ! -f file1
76 test -f file2
77 test ! -f file3