diff options
author | Gaetan Nadon <memsize@videotron.ca> | 2010-02-11 20:57:26 -0500 |
---|---|---|
committer | Gaetan Nadon <memsize@videotron.ca> | 2010-02-15 08:48:12 -0500 |
commit | 4f4e3b731fb7bd1a646775ae096bf7fb2ab4fe29 (patch) | |
tree | 7ef3c1137ef5cba907f15e39647f263178e60779 | |
parent | cc1fe0a696e5707adf29f55c319be05676b4f18b (diff) |
man: make manpage macro substitutions
The man page displays to the user the variables to be substituted
such as __vendorversion__.
The filename in git should be .man.
The process to substitute the variables is the same used by
all other modules.
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | man/.gitignore | 3 | ||||
-rw-r--r-- | man/AppleWM.man (renamed from man/AppleWM.3) | 0 | ||||
-rw-r--r-- | man/Makefile.am | 32 |
4 files changed, 30 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 0ea3c35..08f3cd1 100644 --- a/configure.ac +++ b/configure.ac @@ -37,6 +37,7 @@ AM_CONFIG_HEADER(config.h) # Check for progs AC_PROG_CC AC_PROG_LIBTOOL +AC_PROG_SED # Check for dependencies PKG_CHECK_MODULES(APPLEWM, x11 xext xextproto [applewmproto >= 1.4]) diff --git a/man/.gitignore b/man/.gitignore deleted file mode 100644 index 58d42ad..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 -!AppleWM.3 diff --git a/man/AppleWM.3 b/man/AppleWM.man index bb81470..bb81470 100644 --- a/man/AppleWM.3 +++ b/man/AppleWM.man diff --git a/man/Makefile.am b/man/Makefile.am index a749878..1f5f970 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -19,6 +19,32 @@ # PERFORMANCE OF THIS SOFTWARE. # -man3_MANS = \ - AppleWM.3 -EXTRA_DIST = $(man3_MANS) +libman_PRE = AppleWM.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__|XQuartz|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) < $< > $@ + |