2 # Copyright (C) 2003-2012 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 2, 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@.
20 # For gen-testsuite-part: ==> try-with-serial-tests <==
23 cat >> configure.ac
<< 'END'
24 AM_CONDITIONAL
([COND
], [test -n "$cond"])
25 AC_SUBST
([programs
], ['prg1$(EXEEXT) prg2$(EXEEXT)'])
26 AC_SUBST
([CC
], [whocares
])
30 cat > Makefile.am
<< 'END'
31 AUTOMAKE_OPTIONS
= no-dependencies
39 bin_PROGRAMS
= $
(programs
) @programs@ prg3 $
(BAR
) $
(BAZE
)
40 EXTRA_PROGRAMS
= prg1 prg2 prg3
41 TESTS
= prg1 prg3 prg4 $
(BAZ
)
43 .PHONY
: test-cond test-nocond
45 is $
(bin_PROGRAMS
) == prg1.x prg2.x prg1.x prg2.x prg3.x
46 is $
(EXTRA_PROGRAMS
) == prg1.x prg2.x prg3.x
47 is $
(TESTS
) == prg1.x prg3.x prg4
49 is $
(bin_PROGRAMS
) == prg1.x prg2.x prg1.x prg2.x prg3.x bar.x baz.x
50 is $
(EXTRA_PROGRAMS
) == prg1.x prg2.x prg3.x
51 is $
(TESTS
) == prg1.x prg3.x prg4 baz.x bar.x
52 is $
(BAR
) $
(BAZ
) == bar baz bar
57 $AUTOMAKE --add-missing --copy
65 # Only two am__EXEEXT_* variables are needed here: one for BAR, and one
66 # BAZ. The latter must use the former.
67 test 2 -eq $
(grep -c '__EXEEXT_. =' Makefile.
in)
68 grep 'am__EXEEXT_2 = .*am__EXEEXT_1' Makefile.
in