• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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	wl_display_connect.3
9MANPAGES_ALIASES = \
10	wl_display_connect_to_fd.3
11
12XML_FILES = \
13	${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,$(MANPAGES)}}}}
14CLEANFILES =
15EXTRA_DIST = $(XML_FILES)
16
17if HAVE_XSLTPROC
18if HAVE_MANPAGES_STYLESHEET
19
20CLEANFILES += $(MANPAGES) $(MANPAGES_ALIASES)
21EXTRA_DIST += $(MANPAGES) $(MANPAGES_ALIASES)
22dist_man_MANS = $(MANPAGES) $(MANPAGES_ALIASES)
23
24XSLTPROC_FLAGS = \
25	--stringparam man.authors.section.enabled 0 \
26	--stringparam man.copyright.section.enabled 0 \
27	--stringparam funcsynopsis.style ansi \
28	--stringparam man.output.quietly 1 \
29	--nonet
30
31XSLTPROC_PROCESS_MAN = \
32	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
33	$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(MANPAGES_STYLESHEET) $< && \
34	$(SED) -i -e 's/^\.so \(.*\)\.\(.\)$$/\.so man\2\/\1\.\2/' $(MANPAGES_ALIASES)
35
36%.1: %.xml
37	$(XSLTPROC_PROCESS_MAN)
38
39%.3: %.xml
40	$(XSLTPROC_PROCESS_MAN)
41
42%.5: %.xml
43	$(XSLTPROC_PROCESS_MAN)
44
45%.7: %.xml
46	$(XSLTPROC_PROCESS_MAN)
47
48wl_display_connect_to_fd.3: wl_display_connect.3
49
50endif # HAVE_MANPAGES_STYLESHEET
51endif # HAVE_XSLTPROC
52