2 # Copyright (C) 2002-2013 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.ac << '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)
62 puts ("Which version? Which usage?");
69 cat >sub/scriptok.sh <<EOF
71 echo "Which version? Which usage?"
74 # Not only does this script not support --help/--version, but
75 # it will also hang when run without input.
76 cat >sub/scriptnok.sh <<EOF
81 chmod +x sub/scriptok.sh
82 chmod +x sub/scriptnok.sh
84 # Files required by Gnits.
93 # The following file should not be distributed.
94 # (alpha.sh checks the case where it must be distributed.)
101 grep README-alpha Makefile.in && exit 1
106 # Use --program-prefix to make sure the std-options check honors it.
107 ../configure "--prefix=$(pwd)/../inst-dir" --program-prefix=p
110 # Don't trust th exit status of "make -k" for non-GNU makes.
111 if using_gmake; then status=FAIL; else status=IGNORE; fi
112 run_make -e $status -E -- -k installcheck