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

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

automake 1.4-p6

File size: 580 bytes
Line 
1#! /bin/sh
2
3# Yet another sources-in-conditional test. Report from Tim Goodwin.
4
5. $srcdir/defs || exit 1
6
7cat > configure.in << 'END'
8AM_INIT_AUTOMAKE(nonesuch, nonesuch)
9AC_PROG_CC
10AM_CONDITIONAL(ONE, true)
11AM_CONDITIONAL(TWO, false)
12AC_OUTPUT(Makefile)
13END
14
15cat > Makefile.am << 'END'
16bin_PROGRAMS = targ
17
18if ONE
19OPT_SRC = one.c
20endif
21
22if TWO
23OPT_SRC = $(OPT_SRC) two.c
24endif
25
26targ_SOURCES = main.c $(OPT_SRC)
27END
28
29# The bug is that automake hangs. So we give it a few seconds and
30# then kill it.
31$AUTOMAKE &
32pid=$!
33
34sleep 5
35kill -0 $pid && {
36 kill $pid
37 exit 1
38}
39exit 0
Note: See TracBrowser for help on using the repository browser.