summaryrefslogtreecommitdiffstats
path: root/Documentation/meson.build
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-12-27 14:59:34 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-27 17:28:10 +0100
commitae0b33939d233fa340f1ebb768588dc46a128e4c (patch)
tree39890618ab300e7fcbeca32b49722047798eef39 /Documentation/meson.build
parentDocumentation: inline user-manual.conf (diff)
downloadgit-ae0b33939d233fa340f1ebb768588dc46a128e4c.tar.xz
git-ae0b33939d233fa340f1ebb768588dc46a128e4c.zip
meson: generate user manual
Our documentation contains a user manual that gives people a short introduction to Git. Our Makefile knows to generate the manual into three different formats: an HTML page, a PDF and an info page. The Meson build instructions don't yet generate any of these. While wiring up all these formats I hit a couple of road blocks with how we generate our info pages. Even though I eventually resolved these, it made me question whether anybody actually uses info pages in the first place. Checking through a couple of downstream consumers I couldn't find a single user of either the info pages nor of our PDF manual in Arch Linux, Debian, Fedora, Ubuntu, FreeBSD or OpenBSDFedora. So it's rather safe to assume that there aren't really any users out there, and thus the added complexity does not seem worth it. Wire up support for building the user manual in HTML format and conciously skip over the other two formats. This is basically a form of silent deprecation: if people out there use the other two formats they will eventually complain about them missing in Meson, which means we can wire them up at a later point. If they don't we can phase out these formats eventually. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rw-r--r--Documentation/meson.build32
1 files changed, 32 insertions, 0 deletions
diff --git a/Documentation/meson.build b/Documentation/meson.build
index 48583e9a7f..404cb20d10 100644
--- a/Documentation/meson.build
+++ b/Documentation/meson.build
@@ -382,3 +382,35 @@ foreach manpage, category : manpages
)
endif
endforeach
+
+if get_option('docs').contains('html')
+ xsltproc = find_program('xsltproc')
+
+ user_manual_xml = custom_target(
+ command: asciidoc_common_options + [
+ '--backend=' + asciidoc_docbook,
+ '--doctype=book',
+ '--out-file=@OUTPUT@',
+ '@INPUT@',
+ ],
+ input: 'user-manual.txt',
+ output: 'user-manual.xml',
+ depends: documentation_deps,
+ )
+
+ custom_target(
+ command: [
+ xsltproc,
+ '--xinclude',
+ '--stringparam', 'html.stylesheet', 'docbook-xsl.css',
+ '--param', 'generate.consistent.ids', '1',
+ '--output', '@OUTPUT@',
+ '@INPUT@',
+ user_manual_xml,
+ ],
+ input: 'docbook.xsl',
+ output: 'user-manual.html',
+ install: true,
+ install_dir: get_option('datadir') / 'doc/git-doc',
+ )
+endif