[PATCH xserver] config: build Xserver man pages using XORG_MANPAGE_SECTIONS

Gaetan Nadon memsize at videotron.ca
Tue Nov 23 13:40:47 PST 2010


Nothing requires the use of a C preprocessor
Using standard file exentions (.man) means no need for .gitignore
Use standard directory and makefile

Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 configure.ac                             |    1 +
 doc/.gitignore                           |    2 --
 doc/Makefile.am                          |   27 ++-------------------------
 doc/man/Makefile.am                      |   20 ++++++++++++++++++++
 doc/{Xserver.man.pre => man/Xserver.man} |    0
 5 files changed, 23 insertions(+), 27 deletions(-)
 delete mode 100644 doc/.gitignore
 create mode 100644 doc/man/Makefile.am
 rename doc/{Xserver.man.pre => man/Xserver.man} (100%)

diff --git a/configure.ac b/configure.ac
index bd027cd..2774024 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2183,6 +2183,7 @@ damageext/Makefile
 dbe/Makefile
 dix/Makefile
 doc/Makefile
+doc/man/Makefile
 doc/xml/Makefile
 doc/xml/dtrace/Makefile
 doc/xml/xserver.ent
diff --git a/doc/.gitignore b/doc/.gitignore
deleted file mode 100644
index 952f528..0000000
--- a/doc/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-#		Add & Override for this directory and it's subdirectories
-Xserver.man
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 43606a3..4c08b6f 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,26 +1,3 @@
+SUBDIRS = man xml
 
-# Xserver.man covers options generic to all X servers built in this tree
-# (i.e. those handled in the os/utils.c options processing instead of in
-#  the DDX-level options processing)
-appmandir = $(APP_MAN_DIR)
-appman_PRE = Xserver.man.pre
-
-appman_PROCESSED = $(appman_PRE:man.pre=man)
-appman_DATA = $(appman_PRE:man.pre=@APP_MAN_SUFFIX@)
-
-BUILT_SOURCES = $(appman_PROCESSED)
-CLEANFILES = $(appman_PROCESSED) $(appman_DATA)
-
-include $(top_srcdir)/cpprules.in
-
-.man.$(APP_MAN_SUFFIX):
-	$(AM_V_at)cp $< $@
-
-EXTRAMANDEFS = -D__default_font_path__="`echo $(COMPILEDDEFAULTFONTPATH) | $(SED) -e 's/,/, /g'`"
-
-# Docs about X server internals that we ship with source but don't install
-DEVEL_DOCS = smartsched
-
-EXTRA_DIST = $(DEVEL_DOCS) $(appman_PRE) $(fileman_PRE)
-
-SUBDIRS = xml
+dist_noinst_DATA = smartsched
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
new file mode 100644
index 0000000..dd08512
--- /dev/null
+++ b/doc/man/Makefile.am
@@ -0,0 +1,20 @@
+# Xserver.man covers options generic to all X servers built in this tree
+# (i.e. those handled in the os/utils.c options processing instead of in
+#  the DDX-level options processing)
+
+appmandir = $(APP_MAN_DIR)
+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/doc/Xserver.man.pre b/doc/man/Xserver.man
similarity index 100%
rename from doc/Xserver.man.pre
rename to doc/man/Xserver.man
-- 
1.6.0.4



More information about the xorg-devel mailing list