docs: deprecate .log -> .html conversion by parallel-tests
[automake.git] / tests / cond3.test
blobe2dbdafa3931035792d2c692c2a4ad5f2fe94693
1 #! /bin/sh
2 # Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2010 Free Software
3 # Foundation, Inc.
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)
8 # any later version.
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 # Test sources listed in conditional.
19 # Report from Rob Savoye <rob@cygnus.com>, and Lars J. Aas.
21 . ./defs || Exit 1
23 set -e
25 cat > configure.in << 'END'
26 AC_INIT
27 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
28 AC_PROG_CC
29 AM_CONDITIONAL(ONE, true)
30 AM_CONDITIONAL(TWO, false)
31 AM_CONDITIONAL(THREE, maybe)
32 AC_OUTPUT(Makefile)
33 END
35 cat > Makefile.am << 'END'
36 bin_PROGRAMS = targ
38 if ONE
39 SONE = one.c
40 else
41 SONE =
42 endif
44 if TWO
45 STWO = two.c
46 else
47 STWO =
48 endif
50 if THREE
51 STHREE = three.c
52 else
53 STHREE =
54 endif
56 targ_SOURCES = $(SONE) $(STWO) $(STHREE)
57 END
59 $ACLOCAL
60 $AUTOMAKE
62 # `b top' so that
63 sed -n '
64 /[oO][bB][jJ][eE][cC][tT].* =/ {
65 : loop
66 /\\$/ {
69 b loop
72 }' Makefile.in >produced
74 cat >expected << 'EOF'
75 @ONE_TRUE@am__objects_1 = one.$(OBJEXT)
76 @TWO_TRUE@am__objects_2 = two.$(OBJEXT)
77 @THREE_TRUE@am__objects_3 = three.$(OBJEXT)
78 am_targ_OBJECTS = $(am__objects_1) $(am__objects_2) $(am__objects_3)
79 targ_OBJECTS = $(am_targ_OBJECTS)
80 EOF
82 diff expected produced