Subject: Re: [PATCH v8 00/23] Modernize the build system

From: Patrick Steinhardt <[email-masked]>
Date: Wed, 20 Nov 2024 09:56:41 +0100

On Wed, Nov 20, 2024 at 02:15:58PM +0900, Junio C Hamano wrote:
> This broke the documentation build with the log ending with
> something like ...
> 
>     GEN asciidoctor-extensions.rb
>     GEN docinfo.html
>     GEN howto-index.txt
>     * new asciidoc flags
>     ASCIIDOC git-tools.html
>     ...
>     ASCIIDOC howto/keep-canonical-history-correct.html
>     ASCIIDOC howto/maintain-git.html
> gmake[1]: *** No rule to make target 'asciidoc.conf', needed by 'technical/api-error-handling.html'.  Stop.
> gmake[1]: *** Waiting for unfinished jobs....
>     ASCIIDOC howto/coordinate-embargoed-releases.html
> asciidoctor: FAILED: 'asciidoctor-extensions' could not be loaded
>   Use --trace to show backtrace
> gmake[1]: *** [Makefile:428: howto/new-command.html] Error 1
> 
> I think all my builds these days (including the ones that push out
> to https://github.com/git/htmldocs.git that in turn results in pages
> at https://git.github.io/htmldocs/ getting updated) use asciidoctor
> with "USE_ASCIIDOCTOR=YesPlease", if it makes a difference.

Indeed. I catched the other case where we rely on "asciidoc.conf"
unconditionally even with asciidoctor, but missed this one. This will be
fixed with the below diff.

Patrick

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 5ebc300ed3..9e6a55e0f3 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -375,7 +375,7 @@ technical/api-index.txt: technical/api-index-skel.txt \
 
 technical/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../
 $(patsubst %,%.html,$(API_DOCS) technical/api-index $(TECH_DOCS)): %.html : %.txt \
-	asciidoc.conf GIT-ASCIIDOCFLAGS
+	$(ASCIIDOC_DEPS)
 	$(QUIET_ASCIIDOC)$(TXT_TO_HTML) $*.txt
 
 SubmittingPatches.txt: SubmittingPatches