diff mbox series

doc: remove manpage-base-url workaround

Message ID 20230322000815.132128-1-felipe.contreras@gmail.com (mailing list archive)
State New, archived
Headers show
Series doc: remove manpage-base-url workaround | expand

Commit Message

Felipe Contreras March 22, 2023, 12:08 a.m. UTC
Commit 50d9bbba92 (Documentation: Avoid use of xmlto --stringparam,
2009-12-04) introduced manpage-base-url.xsl because ancient versions of
xmlto did not have --stringparam.

However, that was more than ten years ago, no need for that complexity
anymore, we can just use --stringparam.

Cc: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Documentation/.gitignore              |  1 -
 Documentation/Makefile                |  9 ++-------
 Documentation/manpage-base-url.xsl.in | 10 ----------
 3 files changed, 2 insertions(+), 18 deletions(-)
 delete mode 100644 Documentation/manpage-base-url.xsl.in

Comments

Todd Zullinger March 22, 2023, 1:24 a.m. UTC | #1
Felipe Contreras wrote:
> Commit 50d9bbba92 (Documentation: Avoid use of xmlto --stringparam,
> 2009-12-04) introduced manpage-base-url.xsl because ancient versions of
> xmlto did not have --stringparam.
> 
> However, that was more than ten years ago, no need for that complexity
> anymore, we can just use --stringparam.

Sounds good.  The issue at the time was with xmlto older
than ~ 0.20.  It was known that 0.18 didn't work, which
affected both openSUSE 11.2 and CentOS 5, as reported in
https://lore.kernel.org/git/m2hbs85koj.fsf@igel.home/ and
the following messages).

I wish I'd have included the details on which xmlto versions
were affected in the commit message.  The project was
managed in SVN at the time and I can't (easily) find the
source older than it's import to git around 0.21.

Not that it's important.  It was already rather old versions
of xmlto which were affected -- in 2009.

Thanks,
diff mbox series

Patch

diff --git a/Documentation/.gitignore b/Documentation/.gitignore
index 1c3771e7d7..a48448de32 100644
--- a/Documentation/.gitignore
+++ b/Documentation/.gitignore
@@ -10,7 +10,6 @@  howto-index.txt
 doc.dep
 cmds-*.txt
 mergetools-*.txt
-manpage-base-url.xsl
 SubmittingPatches.txt
 tmp-doc-diff/
 GIT-ASCIIDOCFLAGS
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 9c67c3a1c5..11a0093709 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -189,7 +189,7 @@  endif
 ifndef MAN_BASE_URL
 MAN_BASE_URL = file://$(htmldir)/
 endif
-XMLTO_EXTRA += -m manpage-base-url.xsl
+XMLTO_EXTRA += --stringparam man.base.url.for.relative.links='$(MAN_BASE_URL)'
 
 # If your target system uses GNU groff, it may try to render
 # apostrophes as a "pretty" apostrophe using unicode.  This breaks
@@ -339,7 +339,6 @@  clean:
 	$(RM) technical/*.html technical/api-index.txt
 	$(RM) SubmittingPatches.txt
 	$(RM) $(cmds_txt) $(mergetools_txt) *.made
-	$(RM) manpage-base-url.xsl
 	$(RM) GIT-ASCIIDOCFLAGS
 
 $(MAN_HTML): %.html : %.txt $(ASCIIDOC_DEPS)
@@ -348,11 +347,7 @@  $(MAN_HTML): %.html : %.txt $(ASCIIDOC_DEPS)
 $(OBSOLETE_HTML): %.html : %.txto $(ASCIIDOC_DEPS)
 	$(QUIET_ASCIIDOC)$(TXT_TO_HTML) -o $@ $<
 
-manpage-base-url.xsl: manpage-base-url.xsl.in
-	$(QUIET_GEN)sed "s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|" $< > $@
-
-
-manpage-prereqs := manpage-base-url.xsl $(wildcard manpage*.xsl)
+manpage-prereqs := $(wildcard manpage*.xsl)
 manpage-cmd = $(QUIET_XMLTO)$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
 
 %.1 : %.xml $(manpage-prereqs)
diff --git a/Documentation/manpage-base-url.xsl.in b/Documentation/manpage-base-url.xsl.in
deleted file mode 100644
index e800904df3..0000000000
--- a/Documentation/manpage-base-url.xsl.in
+++ /dev/null
@@ -1,10 +0,0 @@ 
-<!-- manpage-base-url.xsl:
-     special settings for manpages rendered from newer docbook -->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-		version="1.0">
-
-<!-- set a base URL for relative links -->
-<xsl:param name="man.base.url.for.relative.links"
-	>@@MAN_BASE_URL@@</xsl:param>
-
-</xsl:stylesheet>