aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-12-05 11:39:13 -0800
committerJunio C Hamano <gitster@pobox.com>2009-12-05 11:39:13 -0800
commit3880c18336a77b1a37ec88e5a515498c73eb5551 (patch)
tree33fc7550fe84438699baebaca89bf836f44fb328 /Documentation/Makefile
parent1a56be134f9477296a7ade040e8b802bf3a643a1 (diff)
parentaa031314bf8189a15290d5bd0d85fa2a0307ceb7 (diff)
downloadgit-3880c18336a77b1a37ec88e5a515498c73eb5551.tar.gz
Sync with 1.6.5.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/Makefile')
-rw-r--r--Documentation/Makefile23
1 files changed, 12 insertions, 11 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 3f1042eebb..4797b2dc35 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -105,18 +105,15 @@ XMLTO_EXTRA += -m manpage-suppress-sp.xsl
endif
# Newer DocBook stylesheet emits warning cruft in the output when
-# this is not set, and if set it shows an absolute link. We can
-# 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.
+# this is not set, and if set it shows an absolute link. Older
+# stylesheets simply ignore this parameter.
#
-# 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)
+# Distros may want to use MAN_BASE_URL=file:///path/to/git/docs/
+# or similar.
+ifndef MAN_BASE_URL
+MAN_BASE_URL = file://$(htmldir)/
endif
+XMLTO_EXTRA += -m manpage-base-url.xsl
# If your target system uses GNU groff, it may try to render
# apostrophes as a "pretty" apostrophe using unicode. This breaks
@@ -245,6 +242,7 @@ clean:
$(RM) howto-index.txt howto/*.html doc.dep
$(RM) technical/api-*.html technical/api-index.txt
$(RM) $(cmds_txt) *.made
+ $(RM) manpage-base-url.xsl
$(MAN_HTML): %.html : %.txt
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
@@ -252,7 +250,10 @@ $(MAN_HTML): %.html : %.txt
$(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $< && \
mv $@+ $@
-%.1 %.5 %.7 : %.xml
+manpage-base-url.xsl: manpage-base-url.xsl.in
+ sed "s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|" $< > $@
+
+%.1 %.5 %.7 : %.xml manpage-base-url.xsl
$(QUIET_XMLTO)$(RM) $@ && \
xmlto -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<