summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eefe19f)
raw | patch | inline | side by side (parent: eefe19f)
author | Junio C Hamano <gitster@pobox.com> | |
Thu, 3 Dec 2009 19:12:32 +0000 (11:12 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 3 Dec 2009 19:23:03 +0000 (11:23 -0800) |
Newer DocBook stylesheets want man.base.url.for.relative.links
parameter set when formatting manpages with external references
to turn them into full URLs, and leave a helpful "you should
set this parameter" message in the output. Earlier we added
the MAN_BASE_URL make variable to specify the value for it.
When MAN_BASE_URL is not given, it ought to be safe to set the
parameter to empty; it would result in an empty leading path for
older stylesheets that ignore the parameter, and newer ones
would produce the same "relative URL" without the message.
Unfortunately, older xmlto (at least version 0.0.18 released in
early 2004 that comes with RHEL/CentOS 5) does not understand
the --stringparam command line option, so we cannot add the
parameter definition unconditionally to the command line. Work
it around by passing the parameter only when set.
If you do not have a suitable URL prefix, you can pass a quoted empty
string to it, like so:
$ make MAN_BASE_URL='""'
Signed-off-by: Junio C Hamano <gitster@pobox.com>
parameter set when formatting manpages with external references
to turn them into full URLs, and leave a helpful "you should
set this parameter" message in the output. Earlier we added
the MAN_BASE_URL make variable to specify the value for it.
When MAN_BASE_URL is not given, it ought to be safe to set the
parameter to empty; it would result in an empty leading path for
older stylesheets that ignore the parameter, and newer ones
would produce the same "relative URL" without the message.
Unfortunately, older xmlto (at least version 0.0.18 released in
early 2004 that comes with RHEL/CentOS 5) does not understand
the --stringparam command line option, so we cannot add the
parameter definition unconditionally to the command line. Work
it around by passing the parameter only when set.
If you do not have a suitable URL prefix, you can pass a quoted empty
string to it, like so:
$ make MAN_BASE_URL='""'
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/Makefile | patch | blob | history |
diff --git a/Documentation/Makefile b/Documentation/Makefile
index d4c05ca87945840f6a4f0f183086f9b29d5ad274..1c9dfcea5addb91c3025f8f23eb9364e3bccd054 100644 (file)
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
# use MAN_BASE_URL=http://www.kernel.org/pub/software/scm/git/docs/
# but distros may want to set it to /usr/share/doc/git-core/docs/ or
# something like that.
+#
+# As older stylesheets simply ignore this parameter, it ought to be
+# safe to set it to empty string when the base URL is not specified,
+# but unfortunately we cannot do so unconditionally because at least
+# xmlto 0.0.18 is reported to lack --stringparam option.
+ifdef MAN_BASE_URL
XMLTO_EXTRA += --stringparam man.base.url.for.relative.links=$(MAN_BASE_URL)
+endif
# If your target system uses GNU groff, it may try to render
# apostrophes as a "pretty" apostrophe using unicode. This breaks