File: cond3.test

package info (click to toggle)
automake 1%3A1.4-p4-1.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,312 kB
  • ctags: 21
  • sloc: perl: 5,516; sh: 5,218; ansic: 404; makefile: 196
file content (43 lines) | stat: -rwxr-xr-x 600 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#! /bin/sh

# Test sources listed in conditional.
# Report from Rob Savoye <rob@cygnus.com>.

. $srcdir/defs || exit 1

cat > configure.in << 'END'
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
AC_PROG_CC
AM_CONDITIONAL(ONE, true)
AM_CONDITIONAL(TWO, false)
AM_CONDITIONAL(THREE, maybe)
AC_OUTPUT(Makefile)
END

cat > Makefile.am << 'END'
bin_PROGRAMS = targ

if ONE
SONE = one.c
else
SONE =
endif

if TWO
STWO = two.c
else
STWO =
endif

if THREE
STHREE = three.c
else
STHREE =
endif

targ_SOURCES = $(SONE) $(STWO) $(STHREE)
END

$AUTOMAKE || exit 1

test "`grep 'targ_OBJECTS =' Makefile.in | wc -l`" -eq 8