[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: missing help2man
From: |
Ralf Wildenhues |
Subject: |
Re: missing help2man |
Date: |
Sun, 21 Dec 2008 22:49:05 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
* Karl Berry wrote on Sat, Nov 29, 2008 at 11:16:37PM CET:
> I'm still wondering about whether and how to document this in the
> manual.
>
> I think one place would be the Preparing Distributions node, explaining
> that distcheck and dist will fail if `missing'-generated man pages are
> present.
>
> And perhaps the maintainer-mode node, since that is where missing is
> discussed, explaining about the help2man "replacement" not failing. (By
> the way, I find it odd that that node contains two subsections, instead
> of them being their own nodes.)
>
> The only place that now talks about help2man specifically is
> distcleancheck, in an example. That doesn't seem like the right place.
> I noticed a typo in that node, though:
> Because we don't to force want our users to install `help2man',
> "want" should be deleted.
I still owe this adjusting of the manual; not sure about all the bits
yet either. But let's get the bug out of the way first; the distdir
addition needed some more fixes in order to avoid false negatives.
Here is the incremental diff over the previous posted patch which I
squashed together, and pushed to both branches.
Thanks,
Ralf
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index e72d164..81d2210 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -85,13 +85,23 @@ endif %?TOPDIR_P%
##
if %?INSTALL-MAN%
if %?HAVE-MANS%
- @list='$(MANS)'; if test -n "$$list" \
- && grep 'ab help2man is required to generate this page' $$list
>/dev/null; then \
- echo "error: found man pages containing the \`missing help2man'
replacement text:" >&2; \
- grep -l 'ab help2man is required to generate this page' $$list | sed
's/^/ /' >&2; \
- echo " to fix them, install help2man, remove and regenerate the
man pages;" >&2; \
- echo " typically \`make maintainer-clean' will remove them"
>&2; \
- exit 1; \
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+## Note that we check existing man pages here only. If there are man pages
+## which are not distributed, and may be generated only conditionally, then
+## we should not error out because of them. This could be refined to take
+## into account only dist_*_MANS, but then we'd be missing out on those
+## the user distributes with EXTRA_DIST.
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list
>/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man'
replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list |
sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate
the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them"
>&2; \
+ exit 1; \
+ else :; fi; \
else :; fi
endif %?HAVE-MANS%
endif %?INSTALL-MAN%
diff --git a/tests/man4.test b/tests/man4.test
index 29b35ae..558c880 100755
--- a/tests/man4.test
+++ b/tests/man4.test
@@ -36,11 +36,15 @@
set -e
cat > Makefile.am << 'END'
-dist_man_MANS = $(srcdir)/foo.1
-dist_bin_SCRIPTS = foo
+dist_man_MANS = $(srcdir)/foo.1 bar.1
+dist_bin_SCRIPTS = foo bar
$(srcdir)/foo.1:
$(HELP2MAN) --output=$@ $(srcdir)/foo
-MAINTAINERCLEANFILES = $(dist_man_MANS)
+bar.1:
+ $(HELP2MAN) --output=$(srcdir)/bar.1 $(srcdir)/bar
+
+## It is a bug that we need to list $(srcdir)/bar.1 explicitly here.
+MAINTAINERCLEANFILES = $(dist_man_MANS) $(srcdir)/bar.1
END
cat >>configure.in <<'END'
@@ -59,13 +63,15 @@ while test $# -gt 0; do
done
END
+cp foo bar
+
cat > help2man <<'END'
#! /bin/sh
# fake help2man script that lets `missing' think it is not installed
exit 127
END
-chmod +x foo help2man
+chmod +x foo bar help2man
save_PATH=$PATH
PATH=`pwd`:$PATH
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: missing help2man,
Ralf Wildenhues <=