build: Pre-generate man pages at dist time

The man pages don't change very often, but draw in both docbook and
asciidoc. The latter is particularly problematic, as some distros
still ship only a python2 version of the tool.

Address this by generating the man pages at dist time, and including
the result in the tarball.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1553>
This commit is contained in:
Florian Müllner 2020-12-15 19:23:14 +01:00
parent 88ac08b542
commit 9ef9a5ff8a
3 changed files with 39 additions and 5 deletions

View file

@ -37,6 +37,7 @@ gst_req = '>= 0.11.92'
nm_req = '>= 1.10.4'
secret_req = '>= 0.18'
fs = import('fs')
gnome = import('gnome')
i18n = import('i18n')
@ -126,8 +127,12 @@ else
endif
if get_option('man')
a2x = find_program('a2x')
subdir('man')
if fs.exists('man/gnome-shell.1')
install_man('man/gnome-shell.1')
else
a2x = find_program('a2x')
subdir('man')
endif
endif
mutter_typelibdir = mutter_dep.get_pkgconfig_variable('typelibdir')
@ -287,6 +292,7 @@ if get_option('gtk_doc')
endif
meson.add_install_script('meson/postinstall.py')
meson.add_dist_script('meson/generate-manpages.py')
summary_options = {
'networkmanager': get_option('networkmanager'),