Simplify man page building.

This commit is contained in:
Simon Josefsson
2009-12-17 16:30:36 +01:00
parent 69ce7de397
commit 9163f840bf
2 changed files with 13 additions and 28 deletions

View File

@@ -2,6 +2,8 @@
* man/Makefile.am (all): Change daemon man section from 1 to 8.
(.h2m.8): Add rule for daemons.
(.h2m.1): Invoke new meta-rule 'man'.
(man): New meta-rule to invoke help2man, simplified from before.
* NEWS: Updated.
Reported by Juergen Daubert <juergen.daubert@gmx.net>.

View File

@@ -174,33 +174,16 @@ uucpd.8: uucpd.h2m $(top_srcdir)/uucpd/uucpd.c $(top_srcdir)/configure.ac
whois.1: whois.h2m $(top_srcdir)/whois/whois.c $(top_srcdir)/configure.ac
.h2m.1:
rm -f $@ $@-t \
&& { \
rm -rf tmp; \
mkdir tmp; \
(cd tmp && $(LN_S) ../../$*/$* $*); \
$(HELP2MAN) \
--source='$(PACKAGE_STRING)' \
--include=$(srcdir)/$*.h2m \
--output=tmp/$@ tmp/$*; \
} \
&& cp tmp/$@ $@-t \
&& rm -rf tmp \
&& mv $@-t $@
make man TOOL=$* SECTION=1
.h2m.8:
rm -f $@ $@-t \
&& { \
rm -rf tmp; \
mkdir tmp; \
(cd tmp && $(LN_S) ../../$*/$* $*); \
$(HELP2MAN) \
--source='$(PACKAGE_STRING)' \
--include=$(srcdir)/$*.h2m \
--output=tmp/$@ \
--section 8 \
tmp/$*; \
} \
&& cp tmp/$@ $@-t \
&& rm -rf tmp \
&& mv $@-t $@
make man TOOL=$* SECTION=8
.PHONY: man
man:
$(HELP2MAN) \
--source='$(PACKAGE_STRING)' \
--include=$(srcdir)/$(TOOL).h2m \
--output=$(TOOL).$(SECTION) \
--section $(SECTION) \
../$(TOOL)/$(TOOL)