2 # Copyright (C) 2001, 2002, 2003 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 # Test to make sure `.' in an exe name doesn't fool us.
18 # Report from Robert Collins.
19 # Also make sure we rewrite conditionals variables.
20 # Also check for PR/352.
21 # Also make sure the old definitions of bin_PROGRAMS and friend
22 # aren't left around. Report from Jim Meyering.
26 cat >> configure.
in << 'END'
28 AM_CONDITIONAL
([WANT_MT
], [test -z "$revert"])
29 AM_CONDITIONAL
([WANT_RMT
], [test -z "$revert"])
33 cat > Makefile.am
<< 'END'
34 ## Use a different dir for each to make grep easy.
36 sbin_PROGRAMS
= maude.static
37 ## We don't define this one for now. Probably it is an error.
38 ## noinst_PROGRAMS = maude2.exe
39 check_PROGRAMS
= maude3$
(EXEEXT
)
45 libexec_PROGRAMS
= rmt
49 @
echo 1BEG
: $
(bin_PROGRAMS
) :END1
50 @
echo 2BEG
: $
(sbin_PROGRAMS
) :END2
51 @
echo 3BEG
: $
(check_PROGRAMS
) :END3
52 @
echo 4BEG
: $
(libexec_PROGRAMS
) :END4
61 grep '^maude$(EXEEXT):' Makefile.
in
62 grep '^maude\.static$(EXEEXT):' Makefile.
in
63 grep '^maude3$(EXEEXT):' Makefile.
in
64 grep '^mt$(EXEEXT):' Makefile.
in
65 grep '^rmt$(EXEEXT):' Makefile.
in
66 test `grep '^bin_PROGRAMS =' Makefile.in | wc -l` = 1
68 # Make sure $(EXEEXT) gets stripped before canonicalization.
69 grep 'maude3__EXEEXT__OBJECTS' Makefile.
in && Exit
1
73 EXEEXT
=.foo
$MAKE -e print
> stdout
76 grep '1BEG: maude.foo mt.foo :END1' stdout
77 grep '2BEG: maude.static.foo :END2' stdout
78 grep '3BEG: maude3.foo :END3' stdout
79 grep '4BEG: rmt.foo :END4' stdout
81 .
/configure revert
=yes
83 EXEEXT
=.foo
$MAKE -e print
> stdout
86 grep '1BEG: maude.foo :END1' stdout
87 grep '2BEG: maude.static.foo :END2' stdout
88 grep '3BEG: maude3.foo :END3' stdout
89 grep '4BEG: :END4' stdout