Doc: fix Asciidoctor css workaround

The previous step introduced docinfo.html to be used to tweak the CSS used by the asciidoctor, that by default renders <code> inside <pre> as a block element, breaking the SYNOPSIS section of a few pages that adopted a new convention we use since Git 2.45. But in this project, HTML files are all generated. We do not force any human to write HTML by hand, which is an unusual and cruel punishment. "*.html" is in the .gitignore file, and "make clean" removes them. Having a tracked .html file makes "make clean" make the tree dirty by removing the tracked docinfo.html file. Let's do an obvious, minimum and stupid workaround to generate that file at runtime instead. The mark-up is being rethought in a major way for the next development cycle, and the CSS workaround we added in the previous step may have to adjusted, possibly in a large way, anyway. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Jul 22, 2024 at 14:17 UTC d44ce6ddd5f1b8c5f5a18abed22ada1b48e893ba
3 files changed +5 -1
Documentation/.gitignore
-1
@@ -1,6 +1,5 @@
1 *.xml
2 *.html
3 -!/docinfo.html
3 *.[1-8]
4 *.made
5 *.texi
Documentation/Makefile
+5
@@ -209,6 +209,8 @@ XMLTO_EXTRA += --skip-validation
209 XMLTO_EXTRA += -x manpage.xsl
210 endif
211
212 +ASCIIDOC_DEPS += docinfo.html
213 +
214 SHELL_PATH ?= $(SHELL)
215 # Shell quote;
216 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
@@ -337,6 +339,9 @@ clean:
339 $(RM) $(cmds_txt) $(mergetools_txt) *.made
340 $(RM) GIT-ASCIIDOCFLAGS
341
342 +docinfo.html: docinfo-html.in
343 + $(QUIET_GEN)$(RM) $@ && cat $< >$@
344 +
345 $(MAN_HTML): %.html : %.txt $(ASCIIDOC_DEPS)
346 $(QUIET_ASCIIDOC)$(TXT_TO_HTML) -d manpage -o $@ $<
347
Documentation/docinfo-html.in renamed