summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2010-02-13 11:10:14 -0500
committerGaetan Nadon <memsize@videotron.ca>2010-02-13 11:15:18 -0500
commit94a3e693ad7a5fe68a107d3a22bce9ed5d58fbe8 (patch)
tree7e741c2f18c68ec7fdcf229fb3cb5ba4e7a5b47d /man
parent9ef24f280532aa075fcd4481bdb589a8ee2d87cf (diff)
man: make manpage macro substitutions
The version shown in the man pages is incorrect. The version was hard-coded rather than having __vendorversion__ substituted. The filename in git should be .man. The process to substitute the variables is the same used by all other modules. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Diffstat (limited to 'man')
-rw-r--r--man/.gitignore3
-rw-r--r--man/Makefile.am32
-rw-r--r--man/WindowsWM.man (renamed from man/WindowsWM.3)2
3 files changed, 30 insertions, 7 deletions
diff --git a/man/.gitignore b/man/.gitignore
deleted file mode 100644
index 56de22d..0000000
--- a/man/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Add & Override for this directory and it's subdirectories
-# Override default pattern *.[0-9] from toplevel .gitignore
-!WindowsWM.3
diff --git a/man/Makefile.am b/man/Makefile.am
index 4217bfe..46672f0 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -19,6 +19,32 @@
# PERFORMANCE OF THIS SOFTWARE.
#
-man3_MANS = \
- WindowsWM.3
-EXTRA_DIST = $(man3_MANS)
+libman_PRE = WindowsWM.man
+libmandir = $(LIB_MAN_DIR)
+libman_DATA = $(libman_PRE:man=$(LIB_MAN_SUFFIX))
+
+EXTRA_DIST = $(libman_PRE)
+CLEANFILES = $(libman_DATA)
+
+# Strings to replace in man pages
+XORGRELSTRING = @PACKAGE_STRING@
+ XORGMANNAME = X Version 11
+
+MAN_SUBSTS = \
+ -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
+ -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
+ -e 's|__xservername__|Xorg|g' \
+ -e 's|__xconfigfile__|xorg.conf|g' \
+ -e 's|__projectroot__|$(prefix)|g' \
+ -e 's|__apploaddir__|$(appdefaultdir)|' \
+ -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
+ -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
+ -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
+ -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
+ -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
+
+SUFFIXES = .$(LIB_MAN_SUFFIX) .man
+
+.man.$(LIB_MAN_SUFFIX):
+ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
+
diff --git a/man/WindowsWM.3 b/man/WindowsWM.man
index 2eda612..bac8154 100644
--- a/man/WindowsWM.3
+++ b/man/WindowsWM.man
@@ -31,7 +31,7 @@
.\" .TP \\$1
.\" ..
.\"
-.TH "WINDOWSWM" "3" "Version 1.0" "XFree86" ""
+.TH "WINDOWSWM" __libmansuffix__ __vendorversion__
.SH "NAME"
WindowsWM \- Cygwin/X rootless window management extension.
.SH "SYNTAX"