1# 2# This generates man-pages out of the Docbook XML files. Simply add your files 3# to the $MANPAGES array. If aliases are created, please add them to the 4# MANPAGES_ALIASES array so they get installed correctly. 5# 6 7MANPAGES = \ 8 drm.7 \ 9 drm-kms.7 \ 10 drm-memory.7 \ 11 drmAvailable.3 \ 12 drmHandleEvent.3 \ 13 drmModeGetResources.3 14MANPAGES_ALIASES = \ 15 drm-mm.7 \ 16 drm-gem.7 \ 17 drm-ttm.7 18 19XML_FILES = \ 20 $(patsubst %.1,%.xml,$(patsubst %.3,%.xml,$(patsubst %.5,%.xml,$(patsubst %.7,%.xml,$(MANPAGES))))) 21 22EXTRA_DIST = $(XML_FILES) 23CLEANFILES = $(MANPAGES) $(MANPAGES_ALIASES) .man_fixup 24man_MANS = 25 26if BUILD_MANPAGES 27if HAVE_MANPAGES_STYLESHEET 28 29man_MANS += $(MANPAGES) $(MANPAGES_ALIASES) 30 31XSLTPROC_FLAGS = \ 32 --stringparam man.authors.section.enabled 0 \ 33 --stringparam man.copyright.section.enabled 0 \ 34 --stringparam funcsynopsis.style ansi \ 35 --stringparam man.output.quietly 1 \ 36 --nonet 37 38XSLTPROC_PROCESS_MAN = \ 39 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ 40 $(XSLTPROC) -o "$@" $(XSLTPROC_FLAGS) $(MANPAGES_STYLESHEET) "$<" && \ 41 touch .man_fixup 42 43# Force .man_fixup if $(MANPAGES) are not built 44.man_fixup: | $(MANPAGES) 45 @touch .man_fixup 46 47$(MANPAGES_ALIASES): $(MANPAGES) .man_fixup 48 $(AM_V_GEN)if test -n "$@" ; then $(SED) -i -e 's/^\.so \([a-z_]\+\)\.\([0-9]\)$$/\.so man\2\/\1\.\2/' "$@" ; fi 49 50%.1: $(top_srcdir)/man/%.xml 51 $(XSLTPROC_PROCESS_MAN) 52 53%.3: $(top_srcdir)/man/%.xml 54 $(XSLTPROC_PROCESS_MAN) 55 56%.5: $(top_srcdir)/man/%.xml 57 $(XSLTPROC_PROCESS_MAN) 58 59%.7: $(top_srcdir)/man/%.xml 60 $(XSLTPROC_PROCESS_MAN) 61 62endif # HAVE_MANPAGES_STYLESHEET 63endif # BUILD_MANPAGES 64