diff options
Diffstat (limited to 'doc/man/Makefile.am')
-rw-r--r-- | doc/man/Makefile.am | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am new file mode 100644 index 0000000..7d00b06 --- /dev/null +++ b/doc/man/Makefile.am @@ -0,0 +1,45 @@ +# +# 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 = \ + wl_display_connect.3 +MANPAGES_ALIASES = \ + wl_display_connect_to_fd.3 + +wl_display_connect_to_fd.3: wl_display_connect.3 + +XML_FILES = \ + ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,$(MANPAGES)}}}} +CLEANFILES = $(MANPAGES) $(MANPAGES_ALIASES) +EXTRA_DIST = $(MANPAGES) $(MANPAGES_ALIASES) $(XML_FILES) +man_MANS = $(MANPAGES) $(MANPAGES_ALIASES) + +if HAVE_XSLTPROC + +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 $< && \ + $(SED) -i -e 's/^\.so \(.*\)\.\(.\)$$/\.so man\2\/\1\.\2/' $(MANPAGES_ALIASES) + +%.1: %.xml + $(XSLTPROC_PROCESS_MAN) + +%.3: %.xml + $(XSLTPROC_PROCESS_MAN) + +%.5: %.xml + $(XSLTPROC_PROCESS_MAN) + +%.7: %.xml + $(XSLTPROC_PROCESS_MAN) + +endif # HAVE_XSLTPROC |