2 # Copyright (C) 2002, 2003, 2004, 2007 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 # Test to ensure std-options checking is correct.
22 cat >> configure.
in << 'END'
27 cat > Makefile.am
<< 'END'
28 AUTOMAKE_OPTIONS
= gnits
29 noinst_PROGRAMS
= fubar2
30 bin_PROGRAMS
= fubar sub
/fine
31 nobase_bin_PROGRAMS
= sub
/fubar3
32 fubar_SOURCES
= fubar.c
33 fubar2_SOURCES
= fubar.c
34 sub_fubar3_SOURCES
= fubar.c
35 sub_fine_SOURCES
= fine.c
36 bin_SCRIPTS
= sub
/scriptok.sh sub
/scriptnok.sh
39 grep 'pfubar$(EXEEXT) does not support' stderr
40 grep 'pfubar3$(EXEEXT) does not support' stderr
41 grep 'pscriptnok.sh does not support' stderr
42 ## Only three failures please.
43 test `grep 'does not support --help' stderr | wc -l` = 3
44 test `grep 'does not support --version' stderr | wc -l` = 3
47 test -f ..
/inst-dir
/bin
/pfine$
(EXEEXT
)
48 test ! -f ..
/inst-dir
/bin
/fine$
(EXEEXT
)
51 echo 'int main () { return 0; }' > fubar.c
58 puts
("Which version? Which usage?");
65 cat >sub
/scriptok.sh
<<EOF
67 echo "Which version? Which usage?"
70 # Not only does this script not support --help/--version, but
71 # it will also hang when run without input.
72 cat >sub
/scriptnok.sh
<<EOF
77 chmod +x sub
/scriptok.sh
78 chmod +x sub
/scriptnok.sh
80 # Files required by Gnits.
89 # The following file should not be distributed.
90 # (alpha.test checks the case where it must be distributed.)
99 grep README-alpha Makefile.
in && Exit
1
104 # Use --program-prefix to make sure the std-options check honors it.
105 ..
/configure
"--prefix=`pwd`/../inst-dir" --program-prefix=p
108 $MAKE -k installcheck
2>stderr ||
: # Never trust the exit status of make -k.