source: trunk/essentials/sys-devel/automake-1.4/tests/cond3.test

Last change on this file was 3124, checked in by bird, 18 years ago

automake 1.4-p6

File size: 600 bytes
Line 
1#! /bin/sh
2
3# Test sources listed in conditional.
4# Report from Rob Savoye <rob@cygnus.com>.
5
6. $srcdir/defs || exit 1
7
8cat > configure.in << 'END'
9AM_INIT_AUTOMAKE(nonesuch, nonesuch)
10AC_PROG_CC
11AM_CONDITIONAL(ONE, true)
12AM_CONDITIONAL(TWO, false)
13AM_CONDITIONAL(THREE, maybe)
14AC_OUTPUT(Makefile)
15END
16
17cat > Makefile.am << 'END'
18bin_PROGRAMS = targ
19
20if ONE
21SONE = one.c
22else
23SONE =
24endif
25
26if TWO
27STWO = two.c
28else
29STWO =
30endif
31
32if THREE
33STHREE = three.c
34else
35STHREE =
36endif
37
38targ_SOURCES = $(SONE) $(STWO) $(STHREE)
39END
40
41$AUTOMAKE || exit 1
42
43test "`grep 'targ_OBJECTS =' Makefile.in | wc -l`" -eq 8
Note: See TracBrowser for help on using the repository browser.