|
From: <sv...@va...> - 2009-08-07 06:54:55
|
Author: njn
Date: 2009-08-07 07:54:44 +0100 (Fri, 07 Aug 2009)
New Revision: 10740
Log:
Manpage improvements:
- Added a manpage for ms_print.
- Added docs/xml/manpages-index.xml, which is just used as a convenient
single file to hang all the man pages off so they can be generated in a
single command.
- Added facility whereby manpage generation will attempt to find the
stylesheet in multiple places. This means I don't have to constantly edit
XSL_MAN_STYLE to build manpages on my machine.
- Changed vg-docs-path to start with $INSTALL instead of /usr/, because we
can't assume that's the installation dir.
Added:
trunk/docs/xml/manpages-index.xml
trunk/massif/docs/ms_print-manpage.xml
Modified:
trunk/docs/Makefile.am
trunk/docs/README
trunk/docs/xml/valgrind-manpage.xml
trunk/docs/xml/vg-entities.xml
trunk/massif/Makefile.am
trunk/massif/docs/ms-manual.xml
trunk/massif/ms_print.in
Modified: trunk/docs/Makefile.am
===================================================================
--- trunk/docs/Makefile.am 2009-08-07 06:47:52 UTC (rev 10739)
+++ trunk/docs/Makefile.am 2009-08-07 06:54:44 UTC (rev 10740)
@@ -57,6 +57,7 @@
xml/dist-docs.xml \
xml/index.xml \
xml/licenses.xml \
+ xml/manpages-index.xml \
xml/manual.xml \
xml/manual-intro.xml \
xml/manual-core.xml \
@@ -106,7 +107,9 @@
XSL_FO_STYLE = $(mylibdir)/vg-fo.xsl
XSL_TEXT_STYLE = $(mylibdir)/vg-faq2txt.xsl
XSL_WEBSITE_STYLE = $(mylibdir)/vg-html-website.xsl
-XSL_MAN_STYLE = /usr/share/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl
+XSL_MAN_STYLES = \
+ /usr/share/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl \
+ /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl
all-docs: FAQ.txt man-page html-docs print-docs
@@ -119,16 +122,21 @@
export XML_CATALOG_FILES=$(XML_CATALOG_FILES) && \
$(XSLTPROC) $(XSLTPROC_FLAGS) -o ./FAQ.txt $(XSL_TEXT_STYLE) $(myxmldir)/FAQ.xml
-# the valgrind manpage
+# the valgrind manpages
man-page:
- if test ! -f $(XSL_MAN_STYLE); then \
- echo "Error: I can't find the file '$(XSL_MAN_STYLE)'"; \
- echo "Please check where it lives on your system, and" \
- "amend the line 'XSL_MAN_STYLE = ' in this Makefile."; \
- exit 1; \
- fi;
- export XML_CATALOG_FILES=$(XML_CATALOG_FILES) && \
- $(XSLTPROC) $(XSLTPROC_FLAGS) -o ./ $(XSL_MAN_STYLE) $(myxmldir)/valgrind-manpage.xml
+ for x in $(XSL_MAN_STYLES) ; do \
+ if test -f $$x; then \
+ echo "Using manpage stylesheet: $$x"; \
+ export XML_CATALOG_FILES=$(XML_CATALOG_FILES) && \
+ $(XSLTPROC) $(XSLTPROC_FLAGS) -o ./ $$x $(myxmldir)/manpages-index.xml; \
+ exit 0; \
+ fi; \
+ done; \
+ echo ""; \
+ echo "Error: I can't find the XSL_MAN_STYLE file"; \
+ echo "Please check where it lives on your system, and" \
+ "amend the line 'XSL_MAN_STYLES = ' in this Makefile."; \
+ exit 1;
# chunked html, on a chapter-by-chapter basis
html-docs:
Modified: trunk/docs/README
===================================================================
--- trunk/docs/README 2009-08-07 06:47:52 UTC (rev 10739)
+++ trunk/docs/README 2009-08-07 06:54:44 UTC (rev 10740)
@@ -128,11 +128,12 @@
Actually, I'm not sure if the 'docbook' is necessary, but 'docbook-xsl'
definitely is.
-To build the man pages I also had to change the value of XSL_MAN_STYLE from this:
+To build the man pages I also changed the Makefile.am to try this
+stylesheet:
/usr/share/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl
-to this:
+if it can't find this one:
/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl
Added: trunk/docs/xml/manpages-index.xml
===================================================================
--- trunk/docs/xml/manpages-index.xml (rev 0)
+++ trunk/docs/xml/manpages-index.xml 2009-08-07 06:54:44 UTC (rev 10740)
@@ -0,0 +1,19 @@
+<?xml version="1.0"?> <!-- -*- sgml -*- -->
+<!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+
+<!-- This file is not part of the distributed docs, it's just here so we can
+ point $(XSTLPROC) at a single file and get all the man pages. -->
+
+<set>
+
+<!-- valgrind -->
+<xi:include href="valgrind-manpage.xml" parse="xml"
+ xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+<!-- ms_print -->
+<xi:include href="../../massif/docs/ms_print-manpage.xml" parse="xml"
+ xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+</set>
+
Modified: trunk/docs/xml/valgrind-manpage.xml
===================================================================
--- trunk/docs/xml/valgrind-manpage.xml 2009-08-07 06:47:52 UTC (rev 10739)
+++ trunk/docs/xml/valgrind-manpage.xml 2009-08-07 06:54:44 UTC (rev 10740)
@@ -222,8 +222,8 @@
<title>See Also</title>
<para>
-<filename>&vg-docs-path;</filename>,
-and/or
+ms_print(1),
+<filename>&vg-docs-path;</filename> or
<filename>&vg-docs-url;</filename>.
</para>
@@ -233,13 +233,10 @@
<refsect1 id="author">
<title>Author</title>
-<para>This manpage has been written by Andres Roldan <ar...@de...>
-for the Debian Project, but can be used for any other distribution.</para>
+<para>This manpage written by Andres Roldan <ar...@de...>,
+Robert Walsh <rj...@du...>, and the Valgrind
+developers.</para>
-<para>Updated, rearranged and expanded by Robert Walsh
-<rj...@du...> for the 2.4.0 release, and by other
-Valgrind developers subsequently.</para>
-
</refsect1>
Modified: trunk/docs/xml/vg-entities.xml
===================================================================
--- trunk/docs/xml/vg-entities.xml 2009-08-07 06:47:52 UTC (rev 10739)
+++ trunk/docs/xml/vg-entities.xml 2009-08-07 06:54:44 UTC (rev 10740)
@@ -9,7 +9,7 @@
<!ENTITY rel-date "2 January 2009">
<!-- where the docs are installed -->
-<!ENTITY vg-docs-path "/usr/share/doc/valgrind/html/index.html">
+<!ENTITY vg-docs-path "$INSTALL/share/doc/valgrind/html/index.html">
<!-- valgrind website links used in lots of places in the docs -->
<!-- kept in here 'cos everytime the website gets changed, it`s -->
Modified: trunk/massif/Makefile.am
===================================================================
--- trunk/massif/Makefile.am 2009-08-07 06:47:52 UTC (rev 10739)
+++ trunk/massif/Makefile.am 2009-08-07 06:54:44 UTC (rev 10740)
@@ -2,7 +2,9 @@
SUBDIRS += perf
-EXTRA_DIST = docs/ms-manual.xml
+EXTRA_DIST = \
+ docs/ms-manual.xml \
+ docs/ms_print-manpage.xml
#----------------------------------------------------------------------------
# Headers, etc
Modified: trunk/massif/docs/ms-manual.xml
===================================================================
--- trunk/massif/docs/ms-manual.xml 2009-08-07 06:47:52 UTC (rev 10739)
+++ trunk/massif/docs/ms-manual.xml 2009-08-07 06:54:44 UTC (rev 10740)
@@ -829,7 +829,8 @@
<para>ms_print's options are:</para>
-<variablelist>
+<!-- start of xi:include in the manpage -->
+<variablelist id="ms_print.opts.list">
<varlistentry>
<term>
Added: trunk/massif/docs/ms_print-manpage.xml
===================================================================
--- trunk/massif/docs/ms_print-manpage.xml (rev 0)
+++ trunk/massif/docs/ms_print-manpage.xml 2009-08-07 06:54:44 UTC (rev 10740)
@@ -0,0 +1,73 @@
+<?xml version="1.0"?> <!-- -*- sgml -*- -->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[ <!ENTITY % vg-entities SYSTEM "../../docs/xml/vg-entities.xml"> %vg-entities; ]>
+
+
+<refentry id="ms_print">
+
+<refmeta>
+ <refentrytitle>ms_print</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo>Release &rel-version;</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+ <refname>ms_print</refname>
+ <refpurpose>post-processing tool for the Valgrind tool Massif</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<cmdsynopsis>
+ <command>ms_print</command>
+ <arg><replaceable>options</replaceable></arg>
+ <arg>filename</arg>
+</cmdsynopsis>
+</refsynopsisdiv>
+
+
+<refsect1 id="description">
+<title>Description</title>
+
+<para><command>ms_print</command> takes an output file produced by the
+Valgrind tool Massif and prints the information in an easy-to-read form.
+</para>
+
+</refsect1>
+
+
+
+<refsect1 id="options">
+<title>Options</title>
+
+<xi:include href="ms-manual.xml" xpointer="ms_print.opts.list"
+ xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+</refsect1>
+
+
+
+
+<refsect1 id="see_also">
+<title>See Also</title>
+
+<para>
+valgrind(1),
+<filename>&vg-docs-path;</filename> or
+<filename>&vg-docs-url;</filename>.
+</para>
+
+</refsect1>
+
+
+<refsect1 id="author">
+<title>Author</title>
+
+<para>Nicholas Nethercote.</para>
+
+</refsect1>
+
+
+</refentry>
+
+
Modified: trunk/massif/ms_print.in
===================================================================
--- trunk/massif/ms_print.in 2009-08-07 06:47:52 UTC (rev 10739)
+++ trunk/massif/ms_print.in 2009-08-07 06:54:44 UTC (rev 10740)
@@ -67,7 +67,7 @@
options for the user, with defaults in [ ], are:
-h --help show this message
--version show version
- --threshold=<n.n> significance threshold, in percent [$threshold]
+ --threshold=<m.n> significance threshold, in percent [$threshold]
--x=<4..1000> graph width, in columns [72]
--y=<4..1000> graph height, in rows [20]
|