From: Junio C Hamano Date: Tue, 16 Apr 2019 10:28:09 +0000 (+0900) Subject: Merge branch 'ma/doc-diff-doc-vs-doctor-comparison' X-Git-Tag: v2.22.0-rc0~101 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/08c9757a76eaeae1a600b98932e65bd339a73e25?hp=-c Merge branch 'ma/doc-diff-doc-vs-doctor-comparison' Dev support update to make it easier to compare two formatted results from our documentation. * ma/doc-diff-doc-vs-doctor-comparison: doc-diff: add `--cut-header-footer` doc-diff: support diffing from/to AsciiDoc(tor) doc-diff: let `render_tree()` take an explicit directory name Doc: auto-detect changed build flags --- 08c9757a76eaeae1a600b98932e65bd339a73e25 diff --combined Documentation/Makefile index ccac771d3f,b534623012..4e4dd7ecf1 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@@ -331,6 -331,15 +331,15 @@@ mergetools-list.made: ../git-mergetool- show_tool_names can_merge "* " || :' >mergetools-merge.txt && \ date >$@ + TRACK_ASCIIDOCFLAGS = $(subst ','\'',$(ASCIIDOC_COMMON):$(ASCIIDOC_HTML):$(ASCIIDOC_DOCBOOK)) + + GIT-ASCIIDOCFLAGS: FORCE + @FLAGS='$(TRACK_ASCIIDOCFLAGS)'; \ + if test x"$$FLAGS" != x"`cat GIT-ASCIIDOCFLAGS 2>/dev/null`" ; then \ + echo >&2 " * new asciidoc flags"; \ + echo "$$FLAGS" >GIT-ASCIIDOCFLAGS; \ + fi + clean: $(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7 $(RM) *.texi *.texi+ *.texi++ git.info gitman.info @@@ -340,13 -349,14 +349,14 @@@ $(RM) SubmittingPatches.txt $(RM) $(cmds_txt) $(mergetools_txt) *.made $(RM) manpage-base-url.xsl + $(RM) GIT-ASCIIDOCFLAGS - $(MAN_HTML): %.html : %.txt asciidoc.conf asciidoctor-extensions.rb -$(MAN_HTML): %.html : %.txt asciidoc.conf GIT-ASCIIDOCFLAGS ++$(MAN_HTML): %.html : %.txt asciidoc.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ $(TXT_TO_HTML) -d manpage -o $@+ $< && \ mv $@+ $@ - $(OBSOLETE_HTML): %.html : %.txto asciidoc.conf asciidoctor-extensions.rb -$(OBSOLETE_HTML): %.html : %.txto asciidoc.conf GIT-ASCIIDOCFLAGS ++$(OBSOLETE_HTML): %.html : %.txto asciidoc.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ $(TXT_TO_HTML) -o $@+ $< && \ mv $@+ $@ @@@ -354,16 -364,16 +364,16 @@@ manpage-base-url.xsl: manpage-base-url.xsl.in $(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) $@ && \ $(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $< - %.xml : %.txt asciidoc.conf asciidoctor-extensions.rb -%.xml : %.txt asciidoc.conf GIT-ASCIIDOCFLAGS ++%.xml : %.txt asciidoc.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ $(TXT_TO_XML) -d manpage -o $@+ $< && \ mv $@+ $@ - user-manual.xml: user-manual.txt user-manual.conf asciidoctor-extensions.rb -user-manual.xml: user-manual.txt user-manual.conf GIT-ASCIIDOCFLAGS ++user-manual.xml: user-manual.txt user-manual.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ $(TXT_TO_XML) -d book -o $@+ $< && \ mv $@+ $@ @@@ -373,7 -383,8 +383,8 @@@ technical/api-index.txt: technical/api- $(QUIET_GEN)cd technical && '$(SHELL_PATH_SQ)' ./api-index.sh technical/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../ - $(patsubst %,%.html,$(API_DOCS) technical/api-index $(TECH_DOCS)): %.html : %.txt asciidoc.conf + $(patsubst %,%.html,$(API_DOCS) technical/api-index $(TECH_DOCS)): %.html : %.txt \ + asciidoc.conf GIT-ASCIIDOCFLAGS $(QUIET_ASCIIDOC)$(TXT_TO_HTML) $*.txt SubmittingPatches.txt: SubmittingPatches @@@ -430,7 -441,7 +441,7 @@@ $(patsubst %,%.html,$(ARTICLES)) : %.ht WEBDOC_DEST = /pub/software/scm/git/docs howto/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../ - $(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt + $(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt GIT-ASCIIDOCFLAGS $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ sed -e '1,/^$$/d' $< | \ $(TXT_TO_HTML) - >$@+ && \