X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2FMakefile;h=4797b2dc3522ccd2050ddefe990268fddb6b8a47;hb=8222153d8449cb1d0f9c4b06b7f7f5b0c5128205;hp=3f599524eaf2638ee865e8e743c08ce8b9129717;hpb=261fbda903762b9c47e4138312673ea25555d9e5;p=git.git diff --git a/Documentation/Makefile b/Documentation/Makefile index 3f599524e..4797b2dc3 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -104,6 +104,17 @@ ifdef DOCBOOK_SUPPRESS_SP 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. Older +# stylesheets simply ignore this parameter. +# +# 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 # cut&paste, so you should set GNU_ROFF to force them to be ASCII @@ -231,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) $@+ $@ && \ @@ -238,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 $<