summaryrefslogtreecommitdiff
path: root/doc/man/Makefile.am
blob: 14079536f1880eeebbbf02233fca5c8a0a1151db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#
# 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

XML_FILES = \
	${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,$(MANPAGES)}}}}
CLEANFILES =
EXTRA_DIST =
man_MANS =

if HAVE_XSLTPROC
if HAVE_MANPAGES_STYLESHEET

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 \
	--nonet

XSLTPROC_PROCESS_MAN = \
	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
	$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(MANPAGES_STYLESHEET) $< && \
	$(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)

wl_display_connect_to_fd.3: wl_display_connect.3

endif # HAVE_MANPAGES_STYLESHEET
endif # HAVE_XSLTPROC