summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2015-04-06 19:02:38 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2015-04-28 11:21:10 +0100
commite2b531866f9be4b3b1dd9b42f7dda816183792b0 (patch)
treea853ea567534d2d24c9cca53b63a1d0c8d39109d /man
parent41eb131dfe1b8c03cda6e271496bcb7729e58fb6 (diff)
man: rework the Makefile.am
Remove GNU make specific constructs and take into consideration that Solaris man 7 is not the same as Linux man 7. This commit introduces a dependency of xorg-macros 1.12 (released 4+ years ago) which is used to handle the above man section discrepancies. Cc: Niveditha Rau <niveditha.rau@oracle.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'man')
-rw-r--r--man/Makefile.am80
1 files changed, 42 insertions, 38 deletions
diff --git a/man/Makefile.am b/man/Makefile.am
index d25a2936..44b63a57 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,63 +1,67 @@
#
# 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.
+# to the relevant *man_PRE array. If aliases are created, please add them to the
+# *man_aliases_PRE array so they get installed correctly.
#
-MANPAGES = \
- drm.7 \
- drm-kms.7 \
- drm-memory.7 \
- drmAvailable.3 \
- drmHandleEvent.3 \
- drmModeGetResources.3
-MANPAGES_ALIASES = \
- drm-mm.7 \
- drm-gem.7 \
- drm-ttm.7
+libman_PRE = \
+ drmAvailable.xml \
+ drmHandleEvent.xml \
+ drmModeGetResources.xml
-XML_FILES = \
- $(patsubst %.1,%.xml,$(patsubst %.3,%.xml,$(patsubst %.5,%.xml,$(patsubst %.7,%.xml,$(MANPAGES)))))
+miscman_PRE = \
+ drm.xml \
+ drm-kms.xml \
+ drm-memory.xml
-EXTRA_DIST = $(XML_FILES)
-CLEANFILES = $(MANPAGES) $(MANPAGES_ALIASES) .man_fixup
-man_MANS =
+miscman_aliases_PRE = \
+ drm-mm.xml \
+ drm-gem.xml \
+ drm-ttm.xml
+
+libmandir = $(LIB_MAN_DIR)
+miscmandir = $(MISC_MAN_DIR)
+miscman_aliasesdir = $(MISC_MAN_DIR)
-if BUILD_MANPAGES
-if HAVE_MANPAGES_STYLESHEET
+libman_DATA = $(libman_PRE:.xml=.$(LIB_MAN_SUFFIX))
+miscman_DATA = $(miscman_PRE:.xml=.$(MISC_MAN_SUFFIX))
+miscman_aliases_DATA = $(miscman_aliases_PRE:.xml=.$(MISC_MAN_SUFFIX))
-man_MANS += $(MANPAGES) $(MANPAGES_ALIASES)
+XML_FILES = \
+ $(libman_PRE) \
+ $(miscman_PRE)
+
+MAN_FILES = \
+ $(libman_DATA) \
+ $(miscman_DATA) \
+ $(miscman_aliases_DATA)
+
+EXTRA_DIST = $(XML_FILES)
+CLEANFILES = $(MAN_FILES) .man_fixup
XSLTPROC_FLAGS = \
--stringparam man.authors.section.enabled 0 \
--stringparam man.copyright.section.enabled 0 \
--stringparam funcsynopsis.style ansi \
--stringparam man.output.quietly 1 \
- --nonet
+ --nonet \
+ $(MANPAGES_STYLESHEET)
XSLTPROC_PROCESS_MAN = \
- $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
- $(XSLTPROC) -o "$@" $(XSLTPROC_FLAGS) $(MANPAGES_STYLESHEET) "$<" && \
+ $(AM_V_GEN)$(XSLTPROC) -o "$@" $(XSLTPROC_FLAGS) "$<" && \
touch .man_fixup
-# Force .man_fixup if $(MANPAGES) are not built
-.man_fixup: | $(MANPAGES)
- @touch .man_fixup
+# Force .man_fixup if $(miscman_DATA) are not built
+.man_fixup: | $(miscman_DATA)
+ $(AM_V_GEN)touch .man_fixup
-$(MANPAGES_ALIASES): $(MANPAGES) .man_fixup
+$(miscman_aliases_DATA): $(miscman_DATA) .man_fixup
$(AM_V_GEN)if test -n "$@" ; then $(SED) -i -e 's/^\.so \([a-z_]\+\)\.\([0-9]\)$$/\.so man\2\/\1\.\2/' "$@" ; fi
-%.1: $(top_srcdir)/man/%.xml
- $(XSLTPROC_PROCESS_MAN)
+SUFFIXES = .$(LIB_MAN_SUFFIX) .$(MISC_MAN_SUFFIX) .xml
-%.3: $(top_srcdir)/man/%.xml
+.xml.$(LIB_MAN_SUFFIX):
$(XSLTPROC_PROCESS_MAN)
-%.5: $(top_srcdir)/man/%.xml
+.xml.$(MISC_MAN_SUFFIX):
$(XSLTPROC_PROCESS_MAN)
-
-%.7: $(top_srcdir)/man/%.xml
- $(XSLTPROC_PROCESS_MAN)
-
-endif # HAVE_MANPAGES_STYLESHEET
-endif # BUILD_MANPAGES