[PATCH app-rendercheck] man: build man pages the standard way
Gaetan Nadon
memsize at videotron.ca
Fri Mar 26 14:30:49 PDT 2010
Source in git is .man, the suffix may vary by platform
No need to make an exception in .gitignore for rendercheck
Add __xorgversion__ to rendercheck.man
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
.gitignore | 1 -
Makefile.am | 7 ++---
configure.ac | 5 +++-
man/Makefile.am | 48 ++++++++++++++++++++++++++++++++++++++++++++
man/rendercheck.man | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++
rendercheck.1 | 55 ---------------------------------------------------
6 files changed, 110 insertions(+), 61 deletions(-)
create mode 100644 man/Makefile.am
create mode 100644 man/rendercheck.man
delete mode 100644 rendercheck.1
diff --git a/.gitignore b/.gitignore
index 738272a..0c42807 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,4 +77,3 @@ core
# For example, !report.pc overrides *.pc. See 'man gitignore'
#
rendercheck
-rendercheck.1
diff --git a/Makefile.am b/Makefile.am
index 3136e20..d29d73c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,6 @@
+SUBDIRS = man
+
bin_PROGRAMS = rendercheck
-man_MANS = rendercheck.1
rendercheck_SOURCES = \
main.c \
@@ -29,9 +30,7 @@ EXTRA_DIST = \
README \
doc/AddingNewTests \
doc/TODO \
- autogen.sh \
- ${man_MANS}
-
+ autogen.sh
.PHONY: ChangeLog INSTALL
diff --git a/configure.ac b/configure.ac
index 55927d1..a71e53f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,6 +19,7 @@ XORG_MACROS_VERSION(1.3)
XORG_DEFAULT_OPTIONS
AC_PROG_CC
+AC_PROG_SED
# Checks for header files.
@@ -52,5 +53,7 @@ fi
AC_SUBST(RC_CFLAGS)
AC_SUBST(RC_LIBS)
+AC_CONFIG_FILES([Makefile
+ man/Makefile])
-AC_OUTPUT([Makefile])
+AC_OUTPUT
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644
index 0000000..9a52ef2
--- /dev/null
+++ b/man/Makefile.am
@@ -0,0 +1,48 @@
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+appmandir = $(APP_MAN_DIR)
+
+appman_PRE = rendercheck.man
+
+appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
+
+EXTRA_DIST = $(appman_PRE)
+
+CLEANFILES = $(appman_DATA)
+
+# Strings to replace in man pages
+XORGRELSTRING = $(PACKAGE_STRING)
+ XORGMANNAME = X Version 11
+
+MAN_SUBSTS = \
+ -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
+ -e 's|__projectroot__|$(prefix)|g' \
+ -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
+ -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
+ -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
+
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
+
+.man.$(APP_MAN_SUFFIX):
+ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
diff --git a/man/rendercheck.man b/man/rendercheck.man
new file mode 100644
index 0000000..b7be417
--- /dev/null
+++ b/man/rendercheck.man
@@ -0,0 +1,55 @@
+.ds q \N'34'
+.TH rendercheck 1 __xorgversion__
+.SH NAME
+rendercheck \- simple tests of the X Render extension.
+.SH SYNOPSIS
+.nf
+.B rendercheck [\-d|\-\-display display] [\-i|\-\-iter] [\-\-sync] \
+[\-t|\-\-tests test1,test2,test3,...] [\-o|\-\-ops op1,op2,op3,...]
+[\-v|\-\-verbose] [\-\-minimalrendering]
+.fi
+.SH DESCRIPTION
+.B rendercheck
+is a set of simple tests of the X Render extension. It is designed for authors
+of Render implementations in X Servers.
+.SH OPTIONS
+.TP
+.BI \-d|\-\-display\ display
+Specifies the display to test against.
+.TP
+.BI \-i|\-\-iter\ iterations
+Specifies the number of times to repeat each operation before sampling results.
+Some X Servers may behave differently (hardware vs software rendering paths)
+depending on the previous operations done, so this may be used to influence the
+server's choices.
+.TP
+.BI \-\-sync
+Enables synchronous xlib operation, for debugging.
+.TP
+.BI \-t|\-\-tests\ test1,test2,test3...
+Enables only a specific subset of the possible tests. Test names include
+fill, dcoords, scoords, mcoords, tscoords, tmcoords, blend, composite,
+cacomposite, gradients, repeat, triangles, and bug7366.
+Names must be separated by
+commas and have no spaces.
+.TP
+.BI \-f|\-\-formats\ format1,format2,format3...
+Enables only a specific subset of the possible formats. Only formats listed
+in the server-supported format list are available. Names must be separated by
+commas and have no spaces.
+.TP
+.BI \-o|\-\-ops
+Enables only a specific subset of the Render operators.
+.TP
+.BI \-v|\-\-verbose
+Enables verbose printing of information on tests run, and successes and
+failures.
+.TP
+.BI \-\-minimalrendering
+Disables copying of offscreen destinations to the window, which is on by default
+to provide the user with visual feedback.
+.SH BUGS
+Several limitations are documented in the TODO file accompanying the source.
+Please report any further bugs you find to http://bugs.freedesktop.org/.
+.SH AUTHORS
+Eric Anholt, with help from Keith Packard.
diff --git a/rendercheck.1 b/rendercheck.1
deleted file mode 100644
index 4b29091..0000000
--- a/rendercheck.1
+++ /dev/null
@@ -1,55 +0,0 @@
-.ds q \N'34'
-.TH rendercheck 1
-.SH NAME
-rendercheck \- simple tests of the X Render extension.
-.SH SYNOPSIS
-.nf
-.B rendercheck [\-d|\-\-display display] [\-i|\-\-iter] [\-\-sync] \
-[\-t|\-\-tests test1,test2,test3,...] [\-o|\-\-ops op1,op2,op3,...]
-[\-v|\-\-verbose] [\-\-minimalrendering]
-.fi
-.SH DESCRIPTION
-.B rendercheck
-is a set of simple tests of the X Render extension. It is designed for authors
-of Render implementations in X Servers.
-.SH OPTIONS
-.TP
-.BI \-d|\-\-display\ display
-Specifies the display to test against.
-.TP
-.BI \-i|\-\-iter\ iterations
-Specifies the number of times to repeat each operation before sampling results.
-Some X Servers may behave differently (hardware vs software rendering paths)
-depending on the previous operations done, so this may be used to influence the
-server's choices.
-.TP
-.BI \-\-sync
-Enables synchronous xlib operation, for debugging.
-.TP
-.BI \-t|\-\-tests\ test1,test2,test3...
-Enables only a specific subset of the possible tests. Test names include
-fill, dcoords, scoords, mcoords, tscoords, tmcoords, blend, composite,
-cacomposite, gradients, repeat, triangles, and bug7366.
-Names must be separated by
-commas and have no spaces.
-.TP
-.BI \-f|\-\-formats\ format1,format2,format3...
-Enables only a specific subset of the possible formats. Only formats listed
-in the server-supported format list are available. Names must be separated by
-commas and have no spaces.
-.TP
-.BI \-o|\-\-ops
-Enables only a specific subset of the Render operators.
-.TP
-.BI \-v|\-\-verbose
-Enables verbose printing of information on tests run, and successes and
-failures.
-.TP
-.BI \-\-minimalrendering
-Disables copying of offscreen destinations to the window, which is on by default
-to provide the user with visual feedback.
-.SH BUGS
-Several limitations are documented in the TODO file accompanying the source.
-Please report any further bugs you find to http://bugs.freedesktop.org/.
-.SH AUTHORS
-Eric Anholt, with help from Keith Packard.
--
1.6.0.4
More information about the xorg-devel
mailing list