2 # Copyright (C) 1998, 1999, 2001, 2002, 2010 Free Software Foundation,
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # Yet another sources-in-conditional test. Report from Tim Goodwin.
24 cat >> configure.
in << 'END'
26 AM_CONDITIONAL
([ONE
], [true
])
27 AM_CONDITIONAL
([TWO
], [false
])
31 cat > Makefile.am
<< 'END'
39 OPT_SRC
= $
(OPT_SRC
) two.c
42 targ_SOURCES
= main.c $
(OPT_SRC
)
45 # The bug is that automake hangs. So we give it an appropriate grace
46 # time, then kill it if necessary.
51 # MSYS bash seems to have a bug in kill, so don't try to kill too soon;
52 # and avoid maintainer-check test.
55 # Make at most 30 tries, one every 10 seconds (= 300 seconds = 5 min).
57 while test $try -le 30; do
59 : process
$pid is still alive
, wait and retry
64 # Automake must fail with a proper error message.
65 grep 'variable.*OPT_SRC.*recursively defined' stderr
69 # The automake process probably hung. Kill it, and exit with failure.
70 echo "$me: automake process $pid hung"