git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] doc: remove manpage-base-url workaround
@ 2023-03-22  0:08 Felipe Contreras
  2023-03-22  1:24 ` Todd Zullinger
  0 siblings, 1 reply; 2+ messages in thread
From: Felipe Contreras @ 2023-03-22  0:08 UTC (permalink / raw)
  To: git; +Cc: Martin Ågren, Felipe Contreras, Todd Zullinger

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

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>
-- 
2.39.2.13.g1fb56cf030


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] doc: remove manpage-base-url workaround
  2023-03-22  0:08 [PATCH] doc: remove manpage-base-url workaround Felipe Contreras
@ 2023-03-22  1:24 ` Todd Zullinger
  0 siblings, 0 replies; 2+ messages in thread
From: Todd Zullinger @ 2023-03-22  1:24 UTC (permalink / raw)
  To: Felipe Contreras; +Cc: git, Martin Ågren

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,

-- 
Todd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-22  1:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-22  0:08 [PATCH] doc: remove manpage-base-url workaround Felipe Contreras
2023-03-22  1:24 ` Todd Zullinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).