Make sphinx optional again

This commit is contained in:
Sebastian Ramacher 2018-11-25 11:16:05 +01:00
parent fac4f7fea3
commit a428e19b15

View file

@ -1,30 +1,32 @@
sphinx = find_program('sphinx-build') sphinx = find_program('sphinx-build', required: false)
custom_target('man pages', if sphinx.found()
command: [ custom_target('man pages',
sphinx, command: [
'-b', 'man', sphinx,
'-D', 'version=' + version, '-b', 'man',
'-D', 'release=' + version, '-D', 'version=' + version,
join_paths(meson.current_source_dir(), 'man'), '-D', 'release=' + version,
meson.current_build_dir()], join_paths(meson.current_source_dir(), 'man'),
output: ['zathura.1', 'zathurarc.5'], meson.current_build_dir()],
input: [ output: ['zathura.1', 'zathurarc.5'],
'man/conf.py', input: [
'man/_bindings.txt', 'man/conf.py',
'man/_commands.txt', 'man/_bindings.txt',
'man/_options.txt', 'man/_commands.txt',
'man/_synopsis.txt', 'man/_options.txt',
'man/zathurarc.5.rst', 'man/_synopsis.txt',
'man/_bugs.txt', 'man/zathurarc.5.rst',
'man/_configuration.txt', 'man/_bugs.txt',
'man/_description.txt', 'man/_configuration.txt',
'man/_synctex.txt', 'man/_description.txt',
'man/zathura.1.rst' 'man/_synctex.txt',
], 'man/zathura.1.rst'
build_by_default: true, ],
install: true, build_by_default: true,
install_dir: [ install: true,
join_paths(get_option('mandir'), 'man1'), install_dir: [
join_paths(get_option('mandir'), 'man5') join_paths(get_option('mandir'), 'man1'),
] join_paths(get_option('mandir'), 'man5')
) ]
)
endif