diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2012-09-28 23:44:19 +0200 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2013-01-09 16:17:03 -0800 |
commit | 6b7e45c7516b7fdfe85e7792f82624458dcb2ac6 (patch) | |
tree | 6c802a2a375c77b0babbf83487f7abee70db6deb /man/Makefile.am | |
parent | 891517f5111cd82909906d5e8ee0299db0d46762 (diff) | |
download | libdrm-6b7e45c7516b7fdfe85e7792f82624458dcb2ac6.tar.gz libdrm-6b7e45c7516b7fdfe85e7792f82624458dcb2ac6.tar.bz2 libdrm-6b7e45c7516b7fdfe85e7792f82624458dcb2ac6.zip |
man: convert manpages to XML instead of plain troff
If we want to use the manpages in external documentation other than normal
manpages, we should rather use XML. Furthermore, almost no-one knows troff
today, anyway, and XML allows others to easily add more pages without
having to learn troff.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'man/Makefile.am')
-rw-r--r-- | man/Makefile.am | 58 |
1 files changed, 47 insertions, 11 deletions
diff --git a/man/Makefile.am b/man/Makefile.am index ccd6545c..b93fdef8 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -1,11 +1,47 @@ -libmandir = $(LIB_MAN_DIR) -libman_PRE = drmAvailable.man \ - drmHandleEvent.man \ - drmModeGetResources.man -libman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@) -EXTRA_DIST = $(libman_PRE) -CLEANFILES = $(libman_DATA) -SUFFIXES = .$(LIB_MAN_SUFFIX) .man - -.man.$(LIB_MAN_SUFFIX): - $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ +# +# This generates man-pages out of the Docbook XML files. Simply add your files +# to the $MANPAGES array. If aliases are created, please add them to the +# MANPAGES_ALIASES array so they get installed correctly. +# + +MANPAGES = \ + drmAvailable.3 \ + drmHandleEvent.3 \ + drmModeGetResources.3 +MANPAGES_ALIASES = + +XML_FILES = \ + ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubs %.7,%.xml,$(MANPAGES)}}}} +CLEANFILES = +EXTRA_DIST = +man_MANS = + +if HAVE_XSLTPROC + +CLEANFILES += $(MANPAGES) $(MANPAGES_ALIASES) +EXTRA_DIST += $(MANPAGES) $(MANPAGES_ALIASES) $(XML_FILES) +man_MANS += $(MANPAGES) $(MANPAGES_ALIASES) + +XSLTPROC_FLAGS = \ + --stringparam man.authors.section.enabled 0 \ + --stringparam man.copyright.section.enabled 0 \ + --stringparam funcsynopsis.style ansi \ + --stringparam man.output.quietly 1 + +XSLTPROC_PROCESS_MAN = \ + $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ + $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< + +%.1: %.xml + $(XSLTPROC_PROCESS_MAN) + +%.3: %.xml + $(XSLTPROC_PROCESS_MAN) + +%.5: %.xml + $(XSLTPROC_PROCESS_MAN) + +%.7: %.xml + $(XSLTPROC_PROCESS_MAN) + +endif # HAVE_XSLTPROC |