2 # Copyright (C) 2002-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 # Check that AM_INSTALLCHECK_STD_OPTIONS_EXEMPT works.
22 cat >> configure.ac << 'END'
27 # We use the same basename for all targets on purpose. This way
28 # we make sure that 'AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = nok'
29 # will not match anything containing 'nok'.
30 cat > Makefile.am << 'END'
31 AUTOMAKE_OPTIONS = gnits
33 nobase_bin_PROGRAMS = nok sub/nok
35 sub_nok_SOURCES = nok.c
37 nobase_bin_SCRIPTS = nok.sh sub/nok.sh
39 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = nok$(EXEEXT) nok.sh
42 grep 'sub/pnok$(EXEEXT) does not support' stderr
43 grep 'sub/pnok\.sh does not support' stderr
44 ## Only two failures please.
45 test `grep 'does not support --help' stderr | wc -l` = 2
46 test `grep 'does not support --version' stderr | wc -l` = 2
60 echo "Which version? Which usage?"
69 # Files required by Gnits.
85 # Use --program-prefix to make sure the std-options check honors it.
86 ../configure "--prefix=`pwd`/../inst-dir" --program-prefix=p
89 $MAKE installcheck && Exit 1
90 $MAKE -k installcheck 2>stderr || : # Never trust the exit status of make -k.
94 # Make sure there is no more error when all targets are exempted.
96 cat >> Makefile.am <<'END'
97 AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += sub/nok$(EXEEXT) sub/nok.sh
101 ./config.status # Don't rely on the rebuild rules (they need GNU make).