Skip to content

Commit ae0b339

Browse files
pks-tgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 851ecc4 commit ae0b339

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

Documentation/meson.build

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,3 +382,35 @@ foreach manpage, category : manpages
382382
)
383383
endif
384384
endforeach
385+
386+
if get_option('docs').contains('html')
387+
xsltproc = find_program('xsltproc')
388+
389+
user_manual_xml = custom_target(
390+
command: asciidoc_common_options + [
391+
'--backend=' + asciidoc_docbook,
392+
'--doctype=book',
393+
'--out-file=@OUTPUT@',
394+
'@INPUT@',
395+
],
396+
input: 'user-manual.txt',
397+
output: 'user-manual.xml',
398+
depends: documentation_deps,
399+
)
400+
401+
custom_target(
402+
command: [
403+
xsltproc,
404+
'--xinclude',
405+
'--stringparam', 'html.stylesheet', 'docbook-xsl.css',
406+
'--param', 'generate.consistent.ids', '1',
407+
'--output', '@OUTPUT@',
408+
'@INPUT@',
409+
user_manual_xml,
410+
],
411+
input: 'docbook.xsl',
412+
output: 'user-manual.html',
413+
install: true,
414+
install_dir: get_option('datadir') / 'doc/git-doc',
415+
)
416+
endif

0 commit comments

Comments
 (0)