docs: manpage XML depends on asciidoc.conf
When building manual pages, the source text is transformed to XML with AsciiDoc before the man pages are generated from the XML with xmlto. Fix the dependencies in the Makefile so that the XML files are rebuilt when asciidoc.conf changes and not just the manual pages from unchanged XML, and move the dependencies from a recipeless rule to the rules with commands that use asciidoc.conf to make the dependencies easier to understand and maintain. Reported-by: John Keeping <john@keeping.me.uk> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Tested-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder committed
Jan 6, 2013 at 04:01 UTC
fdb042449b2b2e163736864207290793a5fa7aa6
1 file changed
+3
-5
Documentation/Makefile
+3
-5
@@ -178,8 +178,6 @@ all: html man
178
179
html: $(DOC_HTML)
180
181
-$(DOC_HTML) $(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7): asciidoc.conf
182
-
181
man: man1 man5 man7
182
man1: $(DOC_MAN1)
183
man5: $(DOC_MAN5)
@@ -257,7 +255,7 @@ clean:
255
$(RM) $(cmds_txt) *.made
256
$(RM) manpage-base-url.xsl
257
260
-$(MAN_HTML): %.html : %.txt
258
+$(MAN_HTML): %.html : %.txt asciidoc.conf
259
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
260
$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \
261
$(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $< && \
@@ -270,7 +268,7 @@ manpage-base-url.xsl: manpage-base-url.xsl.in
268
$(QUIET_XMLTO)$(RM) $@ && \
269
$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
270
273
-%.xml : %.txt
271
+%.xml : %.txt asciidoc.conf
272
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
273
$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \
274
$(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $< && \
@@ -286,7 +284,7 @@ technical/api-index.txt: technical/api-index-skel.txt \
284
$(QUIET_GEN)cd technical && '$(SHELL_PATH_SQ)' ./api-index.sh
285
286
technical/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../
289
-$(patsubst %,%.html,$(API_DOCS) technical/api-index $(TECH_DOCS)): %.html : %.txt
287
+$(patsubst %,%.html,$(API_DOCS) technical/api-index $(TECH_DOCS)): %.html : %.txt asciidoc.conf
288
$(QUIET_ASCIIDOC)$(ASCIIDOC) -b xhtml11 -f asciidoc.conf \
289
$(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) $*.txt
290