summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2011-01-09 20:28:29 -0500
committerKeith Packard <keithp@keithp.com>2011-01-18 15:11:10 -0800
commit885a3330092c13786baa3aaabd728e71962486c4 (patch)
tree3e90e679ff48294c5861255a8c49036b96d1eacc
parentc86f7c2b8eedd3126066a3aff44bc8767eb5e277 (diff)
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: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: RĂ©mi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--doc/man/Makefile.am16
-rw-r--r--hw/dmx/config/man/Makefile.am10
-rw-r--r--hw/dmx/man/Makefile.am10
-rw-r--r--hw/kdrive/ephyr/man/Makefile.am10
-rw-r--r--hw/vfb/man/Makefile.am10
-rw-r--r--hw/xfree86/doc/man/Makefile.am24
-rw-r--r--hw/xfree86/exa/man/Makefile.am11
-rw-r--r--hw/xfree86/fbdevhw/man/Makefile.am11
-rw-r--r--hw/xfree86/utils/man/Makefile.am10
-rw-r--r--hw/xnest/man/Makefile.am10
-rw-r--r--hw/xquartz/doc/Makefile.am13
-rw-r--r--hw/xwin/man/Makefile.am20
-rw-r--r--manpages.am37
13 files changed, 49 insertions, 143 deletions
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index dd0851270..71d704917 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -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) < $< > $@
diff --git a/hw/dmx/config/man/Makefile.am b/hw/dmx/config/man/Makefile.am
index c12c78f87..9bb62a4c6 100644
--- a/hw/dmx/config/man/Makefile.am
+++ b/hw/dmx/config/man/Makefile.am
@@ -1,10 +1,2 @@
-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) < $< > $@
diff --git a/hw/dmx/man/Makefile.am b/hw/dmx/man/Makefile.am
index a0522ae84..e717aefe2 100644
--- a/hw/dmx/man/Makefile.am
+++ b/hw/dmx/man/Makefile.am
@@ -1,10 +1,2 @@
-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) < $< > $@
diff --git a/hw/kdrive/ephyr/man/Makefile.am b/hw/kdrive/ephyr/man/Makefile.am
index 58f1cbd4a..e8a372143 100644
--- a/hw/kdrive/ephyr/man/Makefile.am
+++ b/hw/kdrive/ephyr/man/Makefile.am
@@ -1,10 +1,2 @@
-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) < $< > $@
diff --git a/hw/vfb/man/Makefile.am b/hw/vfb/man/Makefile.am
index 5decaddb1..93941882a 100644
--- a/hw/vfb/man/Makefile.am
+++ b/hw/vfb/man/Makefile.am
@@ -1,10 +1,2 @@
-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) < $< > $@
diff --git a/hw/xfree86/doc/man/Makefile.am b/hw/xfree86/doc/man/Makefile.am
index 4fbc878c8..fe330a72c 100644
--- a/hw/xfree86/doc/man/Makefile.am
+++ b/hw/xfree86/doc/man/Makefile.am
@@ -1,25 +1,3 @@
-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) < $< > $@
diff --git a/hw/xfree86/exa/man/Makefile.am b/hw/xfree86/exa/man/Makefile.am
index db287db9b..51da4fd50 100644
--- a/hw/xfree86/exa/man/Makefile.am
+++ b/hw/xfree86/exa/man/Makefile.am
@@ -1,11 +1,2 @@
-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) < $< > $@
diff --git a/hw/xfree86/fbdevhw/man/Makefile.am b/hw/xfree86/fbdevhw/man/Makefile.am
index 5da5c5553..7f22a12b9 100644
--- a/hw/xfree86/fbdevhw/man/Makefile.am
+++ b/hw/xfree86/fbdevhw/man/Makefile.am
@@ -1,11 +1,2 @@
-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) < $< > $@
diff --git a/hw/xfree86/utils/man/Makefile.am b/hw/xfree86/utils/man/Makefile.am
index fd2af8ed6..7afc5bcca 100644
--- a/hw/xfree86/utils/man/Makefile.am
+++ b/hw/xfree86/utils/man/Makefile.am
@@ -1,10 +1,2 @@
-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) < $< > $@
diff --git a/hw/xnest/man/Makefile.am b/hw/xnest/man/Makefile.am
index ff3468f59..30b6370bc 100644
--- a/hw/xnest/man/Makefile.am
+++ b/hw/xnest/man/Makefile.am
@@ -1,10 +1,2 @@
-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) < $< > $@
diff --git a/hw/xquartz/doc/Makefile.am b/hw/xquartz/doc/Makefile.am
index 287dc7aab..5a0cde7cc 100644
--- a/hw/xquartz/doc/Makefile.am
+++ b/hw/xquartz/doc/Makefile.am
@@ -1,13 +1,2 @@
-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) < $< > $@
diff --git a/hw/xwin/man/Makefile.am b/hw/xwin/man/Makefile.am
index 98a89a5f7..d19c2729f 100644
--- a/hw/xwin/man/Makefile.am
+++ b/hw/xwin/man/Makefile.am
@@ -1,21 +1,3 @@
-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) < $< > $@
diff --git a/manpages.am b/manpages.am
new file mode 100644
index 000000000..69ee0054d
--- /dev/null
+++ b/manpages.am
@@ -0,0 +1,37 @@
+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) < $< > $@