* automake.in (libtool_new_api): Fix a typo in the comment.
[automake/plouj.git] / tests / cond22.test
blob8167ad83ff6ad60d0e4d49d0b4390ae08859c27c
1 #! /bin/sh
2 # Copyright (C) 2002, 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 2, 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 # Regression test for bug when sources listed in conditional.
22 # Report from Richard Boulton. PR/326.
24 . ./defs || exit 1
26 set -e
28 cat >> configure.in << 'END'
29 AC_PROG_CC
30 AM_CONDITIONAL(ONE, true)
31 AM_CONDITIONAL(TWO, false)
32 AM_CONDITIONAL(THREE, false)
33 AC_OUTPUT
34 END
36 cat > Makefile.am << 'END'
37 bin_PROGRAMS = targ
39 if ONE
40 SONE = one.c
41 endif
43 if TWO
44 STWO =
45 else
46 STWO = two.c
47 endif
49 if THREE
50 STHREE =
51 else
52 STHREE = three.c
53 endif
55 if THREE
56 STHREE2 =
57 else
58 STHREE2 = three2.c
59 endif
61 targ_SOURCES = $(SONE) $(STWO) $(STHREE) $(STHREE2)
63 echo:
64 echo BEG: $(targ_OBJECTS) :END;
65 END
67 $ACLOCAL
68 $AUTOCONF
69 $AUTOMAKE
70 ./configure
71 OBJEXT=oo $MAKE -e echo > output
72 cat output
73 $FGREP 'BEG: one.oo two.oo three.oo three2.oo :END' output