1
0
mirror of https://github.com/git/git.git synced 2024-11-15 17:03:14 +01:00

Merge branch 'ma/asciidoctor-fixes'

Build fix around use of asciidoctor instead of asciidoc

* ma/asciidoctor-fixes:
  asciidoctor-extensions: fix spurious space after linkgit
  Documentation/Makefile: add missing dependency on asciidoctor-extensions
  Documentation/Makefile: add missing xsl dependencies for manpages
This commit is contained in:
Junio C Hamano 2019-04-16 19:28:03 +09:00
commit 8ddee13597
2 changed files with 7 additions and 7 deletions

@ -341,12 +341,12 @@ clean:
$(RM) $(cmds_txt) $(mergetools_txt) *.made $(RM) $(cmds_txt) $(mergetools_txt) *.made
$(RM) manpage-base-url.xsl $(RM) manpage-base-url.xsl
$(MAN_HTML): %.html : %.txt asciidoc.conf $(MAN_HTML): %.html : %.txt asciidoc.conf asciidoctor-extensions.rb
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
$(TXT_TO_HTML) -d manpage -o $@+ $< && \ $(TXT_TO_HTML) -d manpage -o $@+ $< && \
mv $@+ $@ mv $@+ $@
$(OBSOLETE_HTML): %.html : %.txto asciidoc.conf $(OBSOLETE_HTML): %.html : %.txto asciidoc.conf asciidoctor-extensions.rb
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
$(TXT_TO_HTML) -o $@+ $< && \ $(TXT_TO_HTML) -o $@+ $< && \
mv $@+ $@ mv $@+ $@
@ -354,16 +354,16 @@ $(OBSOLETE_HTML): %.html : %.txto asciidoc.conf
manpage-base-url.xsl: manpage-base-url.xsl.in manpage-base-url.xsl: manpage-base-url.xsl.in
$(QUIET_GEN)sed "s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|" $< > $@ $(QUIET_GEN)sed "s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|" $< > $@
%.1 %.5 %.7 : %.xml manpage-base-url.xsl %.1 %.5 %.7 : %.xml manpage-base-url.xsl $(wildcard manpage*.xsl)
$(QUIET_XMLTO)$(RM) $@ && \ $(QUIET_XMLTO)$(RM) $@ && \
$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $< $(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
%.xml : %.txt asciidoc.conf %.xml : %.txt asciidoc.conf asciidoctor-extensions.rb
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
$(TXT_TO_XML) -d manpage -o $@+ $< && \ $(TXT_TO_XML) -d manpage -o $@+ $< && \
mv $@+ $@ mv $@+ $@
user-manual.xml: user-manual.txt user-manual.conf user-manual.xml: user-manual.txt user-manual.conf asciidoctor-extensions.rb
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
$(TXT_TO_XML) -d book -o $@+ $< && \ $(TXT_TO_XML) -d book -o $@+ $< && \
mv $@+ $@ mv $@+ $@

@ -11,12 +11,12 @@ module Git
def process(parent, target, attrs) def process(parent, target, attrs)
if parent.document.basebackend? 'html' if parent.document.basebackend? 'html'
prefix = parent.document.attr('git-relative-html-prefix') prefix = parent.document.attr('git-relative-html-prefix')
%(<a href="#{prefix}#{target}.html">#{target}(#{attrs[1]})</a>\n) %(<a href="#{prefix}#{target}.html">#{target}(#{attrs[1]})</a>)
elsif parent.document.basebackend? 'docbook' elsif parent.document.basebackend? 'docbook'
"<citerefentry>\n" \ "<citerefentry>\n" \
"<refentrytitle>#{target}</refentrytitle>" \ "<refentrytitle>#{target}</refentrytitle>" \
"<manvolnum>#{attrs[1]}</manvolnum>\n" \ "<manvolnum>#{attrs[1]}</manvolnum>\n" \
"</citerefentry>\n" "</citerefentry>"
end end
end end
end end