Commit 885a3330 authored by Gaetan Nadon's avatar Gaetan Nadon Committed by Keith Packard

man: refactor common code in the man pages makefiles

Create a manpages.am makefile snippet in the root dir.
Each man page makefile includes manpages.am.

Now all man pages in xserver are generated the same way
using the same method as all of other xorg modules.
All ".man.pre" files in git are ".man" now.
Links are no longer created between different file types.
Reviewed-by: default avatarAlan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: default avatarRémi Cardona <remi@gentoo.org>
Signed-off-by: default avatarGaetan Nadon <memsize@videotron.ca>
Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent c86f7c2b
......@@ -2,19 +2,5 @@
# (i.e. those handled in the os/utils.c options processing instead of in
# the DDX-level options processing)
appmandir = $(APP_MAN_DIR)
include $(top_srcdir)/manpages.am
appman_PRE = Xserver.man
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
EXTRA_DIST = $(appman_PRE)
CLEANFILES = $(appman_DATA)
SUFFIXES = .$(APP_MAN_SUFFIX) .man
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
# 's|/,|/, |g' will add a space to help font path formatting
MAN_SUBSTS += -e 's|__datadir__|$(datadir)|g' \
-e 's|__default_font_path__|$(COMPILEDDEFAULTFONTPATH)|g' \
-e '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g'
.man.$(APP_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
appmandir = $(APP_MAN_DIR)
include $(top_srcdir)/manpages.am
appman_PRE = xdmxconfig.man vdltodmx.man dmxtodmx.man
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
EXTRA_DIST = $(appman_PRE)
CLEANFILES = $(appman_DATA)
SUFFIXES = .$(APP_MAN_SUFFIX) .man
.man.$(APP_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
appmandir = $(APP_MAN_DIR)
include $(top_srcdir)/manpages.am
appman_PRE = Xdmx.man
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
EXTRA_DIST = $(appman_PRE)
CLEANFILES = $(appman_DATA)
SUFFIXES = .$(APP_MAN_SUFFIX) .man
.man.$(APP_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
appmandir = $(APP_MAN_DIR)
include $(top_srcdir)/manpages.am
appman_PRE = Xephyr.man
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
EXTRA_DIST = $(appman_PRE)
CLEANFILES = $(appman_DATA)
SUFFIXES = .$(APP_MAN_SUFFIX) .man
.man.$(APP_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
appmandir = $(APP_MAN_DIR)
include $(top_srcdir)/manpages.am
appman_PRE = Xvfb.man
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
EXTRA_DIST = $(appman_PRE)
CLEANFILES = $(appman_DATA)
SUFFIXES = .$(APP_MAN_SUFFIX) .man
.man.$(APP_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
appmandir = $(APP_MAN_DIR)
include $(top_srcdir)/manpages.am
appman_PRE = Xorg.man
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
filemandir = $(FILE_MAN_DIR)
fileman_PRE = xorg.conf.man
fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX))
EXTRA_DIST = $(appman_PRE) $(fileman_PRE)
CLEANFILES = $(appman_DATA) $(fileman_DATA)
SUFFIXES = .$(APP_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
MAN_SUBSTS += -e 's|__logdir__|$(logdir)|g' \
-e 's|__datadir__|$(datadir)|g' \
-e 's|__mandir__|$(mandir)|g' \
-e 's|__sysconfdir__|$(sysconfdir)|g' \
-e 's|__xconfigdir__|$(__XCONFIGDIR__)|g' \
-e 's|__xkbdir__|$(XKB_BASE_DIRECTORY)|g' \
-e 's|__modulepath__|$(DEFAULT_MODULE_PATH)|g'
.man.$(APP_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
.man.$(FILE_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
drivermandir = $(DRIVER_MAN_DIR)
include $(top_srcdir)/manpages.am
driverman_PRE = exa.man
driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX))
EXTRA_DIST = $(driverman_PRE)
CLEANFILES = $(driverman_DATA)
SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
.man.$(DRIVER_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
drivermandir = $(DRIVER_MAN_DIR)
include $(top_srcdir)/manpages.am
driverman_PRE = fbdevhw.man
driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX))
EXTRA_DIST = $(driverman_PRE)
CLEANFILES = $(driverman_DATA)
SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
.man.$(DRIVER_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
appmandir = $(APP_MAN_DIR)
include $(top_srcdir)/manpages.am
appman_PRE = cvt.man gtf.man
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
EXTRA_DIST = $(appman_PRE)
CLEANFILES = $(appman_DATA)
SUFFIXES = .$(APP_MAN_SUFFIX) .man
.man.$(APP_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
appmandir = $(APP_MAN_DIR)
include $(top_srcdir)/manpages.am
appman_PRE = Xnest.man
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
EXTRA_DIST = $(appman_PRE)
CLEANFILES = $(appman_DATA)
SUFFIXES = .$(APP_MAN_SUFFIX) .man
.man.$(APP_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
appmandir = $(APP_MAN_DIR)
include $(top_srcdir)/manpages.am
appman_PRE = Xquartz.man
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
EXTRA_DIST = $(appman_PRE)
CLEANFILES = $(appman_DATA)
SUFFIXES = .$(APP_MAN_SUFFIX) .man
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
MAN_SUBSTS += -e 's|__laucnd_id_prefix__|$(LAUNCHD_ID_PREFIX)|g'
.man.$(APP_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
appmandir = $(APP_MAN_DIR)
include $(top_srcdir)/manpages.am
appman_PRE = XWin.man
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
filemandir = $(FILE_MAN_DIR)
fileman_PRE = XWinrc.man
fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX))
EXTRA_DIST = $(appman_PRE) $(fileman_PRE)
CLEANFILES = $(appman_DATA) $(fileman_DATA)
SUFFIXES = .$(APP_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man
# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
MAN_SUBSTS += -e 's|__logdir__|$(logdir)|g' \
-e 's|__datadir__|$(datadir)|g' \
-e 's|__sysconfdir__|$(sysconfdir)|g'
.man.$(APP_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
.man.$(FILE_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
appmandir = $(APP_MAN_DIR)
#appman_PRE = list of application man page files set by calling Makefile.am
appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
drivermandir = $(DRIVER_MAN_DIR)
#driverman_PRE = list of driver man page files set by calling Makefile.am
driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX))
filemandir = $(FILE_MAN_DIR)
#fileman_PRE = list of file man page files set by calling Makefile.am
fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX))
# The calling Makefile should only contain man page targets
# Otherwise the following three global variables may conflict
EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE)
CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA)
SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man
# Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS
# 's|/,|/, |g' will add a space to help font path formatting
MAN_SUBSTS += -e 's|__logdir__|$(logdir)|g' \
-e 's|__datadir__|$(datadir)|g' \
-e 's|__mandir__|$(mandir)|g' \
-e 's|__sysconfdir__|$(sysconfdir)|g' \
-e 's|__xconfigdir__|$(__XCONFIGDIR__)|g' \
-e 's|__xkbdir__|$(XKB_BASE_DIRECTORY)|g' \
-e 's|__laucnd_id_prefix__|$(LAUNCHD_ID_PREFIX)|g' \
-e 's|__modulepath__|$(DEFAULT_MODULE_PATH)|g' \
-e 's|__default_font_path__|$(COMPILEDDEFAULTFONTPATH)|g' \
-e '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g'
.man.$(APP_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
.man.$(DRIVER_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
.man.$(FILE_MAN_SUFFIX):
$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment