2 # Copyright (C) 2003, 2006 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Make sure $(EXEEXT) is appended to programs and to tests that are
18 # programs, but not to @substitutions@.
24 cat >> configure.
in << 'END'
25 AM_CONDITIONAL
([COND
], [test -n "$cond"])
26 AC_SUBST
([programs
], ['prg1$(EXEEXT) prg2$(EXEEXT)'])
31 cat > Makefile.am
<< 'END'
39 bin_PROGRAMS
= $
(programs
) @programs@ prg3 $
(BAR
) $
(BAZE
)
40 EXTRA_PROGRAMS
= prg1 prg2 prg3
41 TESTS
= prg1 prg3 prg4 $
(BAZ
)
44 echo BEG
: $
(bin_PROGRAMS
) :END
46 echo BEG
: $
(EXTRA_PROGRAMS
) :END
48 echo BEG
: $
(TESTS
) :END
50 echo BEG
: $
(BAR
) $
(BAZ
) :END
57 $MAKE print-bin
> output
59 grep 'prg1.bin prg2.bin prg1.bin prg2.bin prg3.bin' output
60 $MAKE print-extra
> output
62 grep 'prg1.bin prg2.bin prg3.bin' output
63 $MAKE print-tests
> output
65 grep 'prg1.bin prg3.bin prg4' output
68 $MAKE print-bin
> output
70 grep 'prg1.bin prg2.bin prg1.bin prg2.bin prg3.bin bar.bin baz.bin' output
71 $MAKE print-tests
> output
73 grep 'prg1.bin prg3.bin prg4 baz.bin bar.bin' output
74 $MAKE print-barbaz
> output
76 grep 'bar baz bar' output
78 # Only two am__EXEEXT_* variables are needed here: one for BAR, and one
79 # BAZ. The latter must use the former.
80 test 2 = `grep '__EXEEXT_. =' Makefile.in | wc -l`
81 grep 'am__EXEEXT_2 = .*am__EXEEXT_1' Makefile.
in