2 # Copyright (C) 2002, 2003 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 autoconf; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 # Boston, MA 02111-1307, USA.
21 # Test to ensure std-options checking is correct.
26 cat >> configure.
in << 'END'
31 cat > Makefile.am
<< 'END'
32 AUTOMAKE_OPTIONS
= gnits
33 noinst_PROGRAMS
= fubar2
34 bin_PROGRAMS
= fubar sub
/fine
35 nobase_bin_PROGRAMS
= sub
/fubar3
36 fubar_SOURCES
= fubar.c
37 fubar2_SOURCES
= fubar.c
38 sub_fubar3_SOURCES
= fubar.c
39 sub_fine_SOURCES
= fine.c
40 bin_SCRIPTS
= sub
/scriptok.sh sub
/scriptnok.sh
43 grep 'pfubar$(EXEEXT) does not support' stderr
44 grep 'pfubar3$(EXEEXT) does not support' stderr
45 grep 'pscriptnok.sh does not support' stderr
46 ## Only three failures please.
47 test `grep 'does not support --help' stderr | wc -l` = 3
48 test `grep 'does not support --version' stderr | wc -l` = 3
51 test -f ..
/inst-dir
/bin
/pfine$
(EXEEXT
)
52 test ! -f ..
/inst-dir
/bin
/fine$
(EXEEXT
)
55 echo 'int main () { return 0; }' > fubar.c
62 puts
("Which version? Which usage?");
69 cat >sub
/scriptok.sh
<<EOF
71 echo "Which version? Which usage?"
74 cat >sub
/scriptnok.sh
<<EOF
79 chmod +x sub
/scriptok.sh
80 chmod +x sub
/scriptnok.sh
82 # Files required by Gnits.
100 # Use --program-prefix to make sure the std-options check honors it.
101 ..
/configure
--prefix=`pwd`/..
/inst-dir
--program-prefix=p
104 $MAKE -k installcheck
2>stderr ||
: # Never trust the exit status of make -k.