From: Philippe Proulx Date: Tue, 25 Jul 2017 01:36:36 +0000 (-0400) Subject: Fix: doc/man: use a single XSL file and match local names X-Git-Tag: v2.11.0-rc1~497 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=360c4f63da21d6d5518a381aa78441d4b72da446;p=lttng-tools.git Fix: doc/man: use a single XSL file and match local names Matching the local name instead of the full name, that is: *[local-name() = 'co'] instead of just `co` matches both the non-namespaced element and the DocBook-namespaced element whether we're using the DocBook 4.5 or DocBook 5.0 stylesheets. Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am index 52bd2688f..eb88e86d8 100644 --- a/doc/man/Makefile.am +++ b/doc/man/Makefile.am @@ -54,12 +54,7 @@ COMMON_TXT = \ # config ASCIIDOC_CONF = $(srcdir)/asciidoc.conf ASCIIDOC_ATTRS_CONF = $(builddir)/asciidoc-attrs.conf -XSL_FILES = \ - manpage.xsl \ - manpage-callouts.xsl \ - manpage-bold-literal.xsl \ - manpage-links.xsl -XSL_SRC_FILES = $(addprefix $(srcdir)/xsl/,$(XSL_FILES)) +XSL_FILE = $(srcdir)/manpage.xsl # common dependencies COMMON_DEPS = $(ASCIIDOC_CONF) $(COMMON_TXT) @@ -121,7 +116,7 @@ xmlto_verbose_0 = @echo " XMLTO " $@; # tools ADOC = $(asciidoc_verbose)$(ASCIIDOC) -f $(ASCIIDOC_CONF) -f $(ASCIIDOC_ATTRS_CONF) -d manpage ADOC_DOCBOOK = $(ADOC) -b docbook -XTO = $(xmlto_verbose)$(XMLTO) -m $(firstword $(XSL_SRC_FILES)) man +XTO = $(xmlto_verbose)$(XMLTO) -m $(XSL_FILE) man # only add this dependency if we can build the man pages because it's # a file generated by the configure script, so it's more recent than @@ -132,19 +127,19 @@ COMMON_DEPS += $(ASCIIDOC_ATTRS_CONF) %.1.xml: $(srcdir)/%.1.txt $(COMMON_DEPS) $(ADOC_DOCBOOK) -o $@ $< -%.1: %.1.xml $(XSL_SRC_FILES) +%.1: %.1.xml $(XSL_FILE) $(XTO) $< 2>/dev/null %.3.xml: $(srcdir)/%.3.txt $(COMMON_DEPS) $(ADOC_DOCBOOK) -o $@ $< -%.3: %.3.xml $(XSL_SRC_FILES) +%.3: %.3.xml $(XSL_FILE) $(XTO) $< 2>/dev/null %.8.xml: $(srcdir)/%.8.txt $(COMMON_DEPS) $(ADOC_DOCBOOK) -o $@ $< -%.8: %.8.xml $(XSL_SRC_FILES) +%.8: %.8.xml $(XSL_FILE) $(XTO) $< 2>/dev/null # only clean the generated files if we have the tools to generate them again @@ -188,7 +183,7 @@ dist-hook: endif # !MAN_PAGES_OPT # always distribute the source files -EXTRA_DIST = $(MAN_TXT) $(COMMON_TXT) $(XSL_SRC_FILES) \ +EXTRA_DIST = $(MAN_TXT) $(COMMON_TXT) $(XSL_FILE) \ $(ASCIIDOC_CONF) $(ASCIIDOC_ATTRS_CONF).in # keep generated man pages that can be considered intermediate files diff --git a/doc/man/manpage.xsl b/doc/man/manpage.xsl new file mode 100644 index 000000000..d576e1406 --- /dev/null +++ b/doc/man/manpage.xsl @@ -0,0 +1,38 @@ + + + + + + + + + sp + + + + + + + + br + + + + + <> + + + \fI\fR + + + + + \fB + + \fR + + + + 0 + diff --git a/doc/man/xsl/manpage-bold-literal.xsl b/doc/man/xsl/manpage-bold-literal.xsl deleted file mode 100644 index c0e0900aa..000000000 --- a/doc/man/xsl/manpage-bold-literal.xsl +++ /dev/null @@ -1,7 +0,0 @@ - - - \fB - - \fR - - diff --git a/doc/man/xsl/manpage-callouts.xsl b/doc/man/xsl/manpage-callouts.xsl deleted file mode 100644 index 2f7a5d7f3..000000000 --- a/doc/man/xsl/manpage-callouts.xsl +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - sp - - - - - - - - br - - diff --git a/doc/man/xsl/manpage-links.xsl b/doc/man/xsl/manpage-links.xsl deleted file mode 100644 index 066292149..000000000 --- a/doc/man/xsl/manpage-links.xsl +++ /dev/null @@ -1,8 +0,0 @@ - - - <> - - - \fI\fR - - diff --git a/doc/man/xsl/manpage.xsl b/doc/man/xsl/manpage.xsl deleted file mode 100644 index b51049fa5..000000000 --- a/doc/man/xsl/manpage.xsl +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - 0 -