From: Nicholas Nethercote Date: Fri, 7 Aug 2009 06:54:44 +0000 (+0000) Subject: Manpage improvements: X-Git-Tag: svn/VALGRIND_3_5_0~110 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e06f6f7164ac198f6daa840c02586b18b9789cc9;p=thirdparty%2Fvalgrind.git 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. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10740 --- diff --git a/docs/Makefile.am b/docs/Makefile.am index 5759f0aae8..9cf464e0f0 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -57,6 +57,7 @@ EXTRA_DIST = \ 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_HTML_CHUNK_STYLE = $(mylibdir)/vg-html-chunk.xsl 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 @@ FAQ.txt: 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: diff --git a/docs/README b/docs/README index dcccb5f6a0..77ecbc5829 100644 --- a/docs/README +++ b/docs/README @@ -128,11 +128,12 @@ For Ubuntu 9.04, to build HTML docs I had to: 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 diff --git a/docs/xml/manpages-index.xml b/docs/xml/manpages-index.xml new file mode 100644 index 0000000000..60aacf3ca7 --- /dev/null +++ b/docs/xml/manpages-index.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + diff --git a/docs/xml/valgrind-manpage.xml b/docs/xml/valgrind-manpage.xml index d055774621..d1988db421 100644 --- a/docs/xml/valgrind-manpage.xml +++ b/docs/xml/valgrind-manpage.xml @@ -222,8 +222,8 @@ system: &vg-docs-path;, or online: See Also -&vg-docs-path;, -and/or +ms_print(1), +&vg-docs-path; or &vg-docs-url;. @@ -233,12 +233,9 @@ and/or Author -This manpage has been written by Andres Roldan <aroldan@debian.org> -for the Debian Project, but can be used for any other distribution. - -Updated, rearranged and expanded by Robert Walsh -<rjwalsh@durables.org> for the 2.4.0 release, and by other -Valgrind developers subsequently. +This manpage written by Andres Roldan <aroldan@debian.org>, +Robert Walsh <rjwalsh@durables.org>, and the Valgrind +developers. diff --git a/docs/xml/vg-entities.xml b/docs/xml/vg-entities.xml index 1f0d0652fa..5da7c013a4 100644 --- a/docs/xml/vg-entities.xml +++ b/docs/xml/vg-entities.xml @@ -9,7 +9,7 @@ - + diff --git a/massif/Makefile.am b/massif/Makefile.am index bfb54a3836..32c54dd032 100644 --- a/massif/Makefile.am +++ b/massif/Makefile.am @@ -2,7 +2,9 @@ include $(top_srcdir)/Makefile.tool.am SUBDIRS += perf -EXTRA_DIST = docs/ms-manual.xml +EXTRA_DIST = \ + docs/ms-manual.xml \ + docs/ms_print-manpage.xml #---------------------------------------------------------------------------- # Headers, etc diff --git a/massif/docs/ms-manual.xml b/massif/docs/ms-manual.xml index 804e400f18..e9f34474ba 100644 --- a/massif/docs/ms-manual.xml +++ b/massif/docs/ms-manual.xml @@ -829,7 +829,8 @@ way. ms_print's options are: - + + diff --git a/massif/docs/ms_print-manpage.xml b/massif/docs/ms_print-manpage.xml new file mode 100644 index 0000000000..efec8fded8 --- /dev/null +++ b/massif/docs/ms_print-manpage.xml @@ -0,0 +1,73 @@ + + %vg-entities; ]> + + + + + + ms_print + 1 + Release &rel-version; + + + + ms_print + post-processing tool for the Valgrind tool Massif + + + + + ms_print + options + filename + + + + + +Description + +ms_print takes an output file produced by the +Valgrind tool Massif and prints the information in an easy-to-read form. + + + + + + + +Options + + + + + + + + + +See Also + + +valgrind(1), +&vg-docs-path; or +&vg-docs-url;. + + + + + + +Author + +Nicholas Nethercote. + + + + + + + diff --git a/massif/ms_print.in b/massif/ms_print.in index 76f72aa670..2b2a412395 100755 --- a/massif/ms_print.in +++ b/massif/ms_print.in @@ -67,7 +67,7 @@ usage: ms_print [options] options for the user, with defaults in [ ], are: -h --help show this message --version show version - --threshold= significance threshold, in percent [$threshold] + --threshold= significance threshold, in percent [$threshold] --x=<4..1000> graph width, in columns [72] --y=<4..1000> graph height, in rows [20]