manpages.am revision 706f2543
1appmandir = $(APP_MAN_DIR)
2#appman_PRE = list of application man page files set by calling Makefile.am
3appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
4
5drivermandir = $(DRIVER_MAN_DIR)
6#driverman_PRE = list of driver man page files set by calling Makefile.am
7driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX))
8
9filemandir = $(FILE_MAN_DIR)
10#fileman_PRE = list of file man page files set by calling Makefile.am
11fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX))
12
13# The calling Makefile should only contain man page targets
14# Otherwise the following three global variables may conflict
15EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE)
16CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA)
17SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man
18
19# Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS
20# 's|/,|/, |g' will add a space to help font path formatting
21MAN_SUBSTS += 	-e 's|__logdir__|$(logdir)|g' \
22		-e 's|__datadir__|$(datadir)|g' \
23		-e 's|__mandir__|$(mandir)|g' \
24		-e 's|__sysconfdir__|$(sysconfdir)|g' \
25		-e 's|__xconfigdir__|$(__XCONFIGDIR__)|g' \
26		-e 's|__xkbdir__|$(XKB_BASE_DIRECTORY)|g' \
27		-e 's|__laucnd_id_prefix__|$(LAUNCHD_ID_PREFIX)|g' \
28		-e 's|__modulepath__|$(DEFAULT_MODULE_PATH)|g' \
29		-e 's|__default_font_path__|$(COMPILEDDEFAULTFONTPATH)|g' \
30		-e '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g'
31
32.man.$(APP_MAN_SUFFIX):
33	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
34.man.$(DRIVER_MAN_SUFFIX):
35	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
36.man.$(FILE_MAN_SUFFIX):
37	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
38