meson_options.txt: add option html_manual
This commit is contained in:
parent
2e73e605f7
commit
9df2469e51
|
@ -1,37 +1,41 @@
|
||||||
install_man(['mpd.1', 'mpd.conf.5'])
|
install_man(['mpd.1', 'mpd.conf.5'])
|
||||||
|
|
||||||
|
if not get_option('html_manual')
|
||||||
|
subdir_done()
|
||||||
|
endif
|
||||||
|
|
||||||
sphinx = find_program('sphinx-build', required: get_option('documentation'))
|
sphinx = find_program('sphinx-build', required: get_option('documentation'))
|
||||||
if not sphinx.found()
|
if not sphinx.found()
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
sphinx_output = custom_target(
|
if get_option('html_manual')
|
||||||
'HTML documentation',
|
sphinx_output = custom_target(
|
||||||
output: 'html',
|
'HTML documentation',
|
||||||
input: [
|
output: 'html',
|
||||||
'index.rst', 'user.rst', 'developer.rst',
|
input: [
|
||||||
'plugins.rst',
|
'index.rst', 'user.rst', 'developer.rst',
|
||||||
'protocol.rst',
|
'plugins.rst',
|
||||||
'conf.py',
|
'protocol.rst',
|
||||||
],
|
'conf.py',
|
||||||
command: [sphinx, '-q', '-b', 'html', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@'],
|
],
|
||||||
build_by_default: true,
|
command: [sphinx, '-q', '-b', 'html', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@'],
|
||||||
install: true,
|
build_by_default: true,
|
||||||
install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()),
|
install: true,
|
||||||
)
|
install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()),
|
||||||
|
)
|
||||||
|
|
||||||
custom_target(
|
custom_target(
|
||||||
'upload',
|
'upload',
|
||||||
input: sphinx_output,
|
input: sphinx_output,
|
||||||
output: 'upload',
|
output: 'upload',
|
||||||
build_always_stale: true,
|
build_always_stale: true,
|
||||||
command: [
|
command: [
|
||||||
'rsync', '-vpruz', '--delete', meson.current_build_dir() + '/',
|
'rsync', '-vpruz', '--delete', meson.current_build_dir() + '/',
|
||||||
'www.musicpd.org:/var/www/mpd/doc/',
|
'www.musicpd.org:/var/www/mpd/doc/',
|
||||||
'--chmod=Dug+rwx,Do+rx,Fug+rw,Fo+r',
|
'--chmod=Dug+rwx,Do+rx,Fug+rw,Fo+r',
|
||||||
'--include=html', '--include=html/**',
|
'--include=html', '--include=html/**',
|
||||||
'--exclude=*',
|
'--exclude=*',
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
option('documentation', type: 'feature', description: 'Build documentation')
|
option('documentation', type: 'feature', description: 'Build documentation')
|
||||||
|
option('html_manual', type: 'boolean', value: true, description: 'Build the HTML manual')
|
||||||
|
|
||||||
option('test', type: 'boolean', value: false, description: 'Build the unit tests and debug programs')
|
option('test', type: 'boolean', value: false, description: 'Build the unit tests and debug programs')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue