2 # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
4 # This file is part of GNU Automake.
6 # GNU Automake is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # GNU Automake is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Automake; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 # Boston, MA 02110-1301, USA.
21 # Make sure $(EXEEXT) is appended to programs and to tests that are
22 # programs, but not to @substitutions@.
28 cat >> configure.
in << 'END'
29 AM_CONDITIONAL
([COND
], [test -n "$cond"])
30 AC_SUBST
([programs
], ['prg1$(EXEEXT) prg2$(EXEEXT)'])
35 cat > Makefile.am
<< 'END'
43 bin_PROGRAMS
= $
(programs
) @programs@ prg3 $
(BAR
) $
(BAZE
)
44 EXTRA_PROGRAMS
= prg1 prg2 prg3
45 TESTS
= prg1 prg3 prg4 $
(BAZ
)
48 echo BEG
: $
(bin_PROGRAMS
) :END
50 echo BEG
: $
(EXTRA_PROGRAMS
) :END
52 echo BEG
: $
(TESTS
) :END
54 echo BEG
: $
(BAR
) $
(BAZ
) :END
61 $MAKE print-bin
> output
63 grep 'prg1.bin prg2.bin prg1.bin prg2.bin prg3.bin' output
64 $MAKE print-extra
> output
66 grep 'prg1.bin prg2.bin prg3.bin' output
67 $MAKE print-tests
> output
69 grep 'prg1.bin prg3.bin prg4' output
72 $MAKE print-bin
> output
74 grep 'prg1.bin prg2.bin prg1.bin prg2.bin prg3.bin bar.bin baz.bin' output
75 $MAKE print-tests
> output
77 grep 'prg1.bin prg3.bin prg4 baz.bin bar.bin' output
78 $MAKE print-barbaz
> output
80 grep 'bar baz bar' output
82 # Only two am__EXEEXT_* variables are needed here: one for BAR, and one
83 # BAZ. The latter must use the former.
84 test 2 = `grep '__EXEEXT_. =' Makefile.in | wc -l`
85 grep 'am__EXEEXT_2 = .*am__EXEEXT_1' Makefile.
in