When generating our user manual we set up a bit of extra configuration compared to our normal configuration. This is done by having an extra "user-manual.conf" file that Asciidoc seems to pull in automatically due to matching filenames with "user-manual.txt". This dependency is quite hidden though and thus easy to miss. Furthermore, it seems that Asciidoc does not know to pull it in for out-of-tree builds where we use relative paths. The setup in AsciiDoctor is somewhat different: instead of having two sets of configuration, we condition the use of manual-specific configs based on whether the document type is "book". And as we only build our user manual with that type this is sufficient. Use the same trick for our user manual by inlining the configuration into "asciidoc.conf.in" and making it conditional on whether or not "doctype-book" is defined. Signed-off-by: Patrick Steinhardt <ps@xxxxxx> --- Documentation/Makefile | 2 +- Documentation/asciidoc.conf.in | 10 ++++++++++ Documentation/user-manual.conf | 11 ----------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index 3392e1ce7ebc540784912476847380d9c1775ac8..31c17f7d655e1dcbdde315115609b798363e7328 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -367,7 +367,7 @@ manpage-cmd = $(QUIET_XMLTO)$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $< %.xml : %.txt $(ASCIIDOC_DEPS) $(QUIET_ASCIIDOC)$(TXT_TO_XML) -d manpage -o $@ $< -user-manual.xml: user-manual.txt user-manual.conf $(ASCIIDOC_DEPS) +user-manual.xml: user-manual.txt $(ASCIIDOC_DEPS) $(QUIET_ASCIIDOC)$(TXT_TO_XML) -d book -o $@ $< technical/api-index.txt: technical/api-index-skel.txt \ diff --git a/Documentation/asciidoc.conf.in b/Documentation/asciidoc.conf.in index dbe36a52eabfabef59e31d3be6518549e4f90206..83ddbb76f65d7a041e4e787a81e19ff1db1d9d55 100644 --- a/Documentation/asciidoc.conf.in +++ b/Documentation/asciidoc.conf.in @@ -25,12 +25,22 @@ manmanual='Git Manual' mansource='Git @GIT_VERSION@' revdate='@GIT_DATE@' +ifdef::doctype-book[] +[titles] + underlines="__","==","--","~~","^^" +endif::doctype-book[] + ifdef::backend-docbook[] [linkgit-inlinemacro] +ifndef::doctype-book[] {0%{target}} {0#<citerefentry>} {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>} {0#</citerefentry>} +endif::doctype-book[] +ifdef::doctype-book[] +<ulink url="{target}.html">{target}{0?({0})}</ulink> +endif::doctype-book[] [literal-inlinemacro] {eval:re.sub(r'(<[-a-zA-Z0-9.]+>)', r'<emphasis>\1</emphasis>', re.sub(r'([\[\s|()>]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,\/_^\$]+\.?)+)',r'\1<literal>\2</literal>', re.sub(r'(\.\.\.?)([^\]$.])', r'<literal>\1</literal>\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))} diff --git a/Documentation/user-manual.conf b/Documentation/user-manual.conf deleted file mode 100644 index 0148f126dcdf6aca15a5560fb5b122b85b022461..0000000000000000000000000000000000000000 --- a/Documentation/user-manual.conf +++ /dev/null @@ -1,11 +0,0 @@ -[titles] - underlines="__","==","--","~~","^^" - -[attributes] -caret=^ -startsb=[ -endsb=] -tilde=~ - -[linkgit-inlinemacro] -<ulink url="{target}.html">{target}{0?({0})}</ulink> -- 2.47.1.668.gf74b3f243a.dirty