cosmetics: few whitespace fixlets
[platform/upstream/automake.git] / tests / cond6.test
1 #! /bin/sh
2 # Copyright (C) 1998, 2001, 2002, 2010, 2011 Free Software Foundation,
3 # Inc.
4 #
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.
9 #
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.
14 #
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/>.
17
18 # Test for an odd conditional bug.  Report from Matt Leach.
19
20 . ./defs || Exit 1
21
22 echo 'AM_CONDITIONAL([FOO], [true])' >> configure.in
23
24 cat > Makefile.am << 'END'
25 if FOO
26
27 helpdir = $(prefix)/Help
28 # The continuation line below must start with a Tab to see the bug.
29 help_DATA = a b c d e \
30         f g h
31
32 else
33
34 helpdir = $(prefix)/help
35 help_DATA = foo
36
37 endif
38
39 a b c d e f g h:
40         touch $@
41
42 .PHONY: print-data
43 print-data:
44         echo BEG: $(help_DATA) :END
45 END
46
47
48 # Older versions of this test checked that automake could process the above
49 # Makefile.am even with no AC_OUTPUT in configure.  So continue to do this
50 # check, for completeness.
51 $ACLOCAL
52 $AUTOMAKE
53
54 rm -rf autom4te*.cache
55
56 echo AC_OUTPUT >> configure.in
57 $AUTOCONF
58 $AUTOMAKE Makefile
59
60 ./configure --prefix="`pwd`/_inst"
61
62 $MAKE print-data >stdout || { cat stdout; Exit 1; }
63 cat stdout
64 grep '^BEG: a b c d e f g h :END$' stdout
65
66 $MAKE install
67 for x in a b c d e f g h; do
68   test -f _inst/Help/$x
69 done
70
71 :