mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-24 10:57:53 +02:00
meson: Detect with-docs and with-man automatically
By default, only build man pages and gtk-doc if the build-deps were found. To force-enable, pass -Dwith-docs=yes and -Dwith-man=yes. Also use a foreach loop for man pages instead of listing them all manually
This commit is contained in:
committed by
Matthias Clasen
parent
5549a1d0c3
commit
88e437873a
@@ -1,4 +1,4 @@
|
||||
if get_option('with-docs')
|
||||
if get_option('with-docs') != 'no'
|
||||
subdir('xml')
|
||||
|
||||
ignore_headers = [
|
||||
@@ -90,28 +90,14 @@ if get_option('with-docs')
|
||||
install: true)
|
||||
endif
|
||||
|
||||
if get_option('with-man')
|
||||
custom_target('glib-gettextize-man',
|
||||
input: 'glib-gettextize.xml',
|
||||
output: 'glib-gettextize.1',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: man1_dir,
|
||||
)
|
||||
|
||||
custom_target('gtester-man',
|
||||
input: 'gtester.xml',
|
||||
output: 'gtester.1',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: man1_dir,
|
||||
)
|
||||
|
||||
custom_target('gtester-report-man',
|
||||
input: 'gtester-report.xml',
|
||||
output: 'gtester-report.1',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: man1_dir,
|
||||
)
|
||||
if get_option('with-man') != 'no' and xsltproc.found()
|
||||
manpages = ['glib-gettextize', 'gtester', 'gtester-report']
|
||||
foreach page : manpages
|
||||
custom_target(page + '-man',
|
||||
input: page + '.xml',
|
||||
output: page + '.1',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: man1_dir)
|
||||
endforeach
|
||||
endif
|
||||
|
Reference in New Issue
Block a user