2 # Copyright (C) 2010-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 # Ensure 'make distcheck' passes when help2man generates man pages,
18 # even if the 'missing' script is involved.
23 # Avoid a spurious failure due to a known FreeBSD make incompatibility.
24 useless_vpath_rebuild \
25 && skip_
"VPATH useless rebuild detected (see bug#7884)"
27 cat > Makefile.am
<< 'END'
28 dist_man_MANS
= $
(srcdir
)/foobar
.1 bazquux
.1 zardoz
.1
29 dist_bin_SCRIPTS
= foobar bazquux zardoz
31 $
(HELP2MAN
) --output=$@ $
(srcdir
)/foobar
33 $
(HELP2MAN
) --output=$@ $
(srcdir
)/bazquux
35 $
(HELP2MAN
) --output=$
(srcdir
)/zardoz
.1 $
(srcdir
)/zardoz
38 cat >> configure.ac
<<'END'
39 AM_MISSING_PROG([HELP2MAN], [help2man])
45 while test $# -gt 0; do
47 -h | --help) echo "usage: $0 [OPTIONS]..."; exit 0;;
48 -v | --version) echo "$0 1.0"; exit 0;;
57 chmod +x foobar bazquux zardoz
68 grep '^HELP2MAN *=.*/missing --run help2man' Makefile
71 $FGREP foobar ..
/foobar
.1
72 $FGREP bazquux .
/bazquux
.1
73 $FGREP zardoz ..
/zardoz
.1
76 $FGREP foobar
$me-1.0
/foobar
.1
77 $FGREP bazquux
$me-1.0
/bazquux
.1
78 $FGREP zardoz
$me-1.0
/zardoz
.1
83 rm -f *.1 # Remove leftover generated manpages.
87 grep '^HELP2MAN *=.*/missing --run help2man' Makefile
90 $FGREP foobar foobar
.1
91 $FGREP bazquux bazquux
.1
92 $FGREP zardoz zardoz
.1
95 $FGREP foobar
$me-1.0
/foobar
.1
96 $FGREP bazquux
$me-1.0
/bazquux
.1
97 $FGREP zardoz
$me-1.0
/zardoz
.1