diff options
author | David Robillard <d@drobilla.net> | 2023-05-05 13:29:20 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-05-05 13:40:29 -0400 |
commit | 5b1b8f450e882f7cd80f2ba2a44ee781cf599a20 (patch) | |
tree | 0ad40bf1754367ae461ad9b3aaffe64ec74d3a29 /doc/c | |
parent | 23434e047960f5bdb4fdc8e643daf5f4ad36dd5e (diff) | |
download | serd-5b1b8f450e882f7cd80f2ba2a44ee781cf599a20.tar.gz serd-5b1b8f450e882f7cd80f2ba2a44ee781cf599a20.tar.bz2 serd-5b1b8f450e882f7cd80f2ba2a44ee781cf599a20.zip |
Add options to disable html or singlehtml documentation
Diffstat (limited to 'doc/c')
-rw-r--r-- | doc/c/meson.build | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/doc/c/meson.build b/doc/c/meson.build index 3a6a3923..f81a692a 100644 --- a/doc/c/meson.build +++ b/doc/c/meson.build @@ -15,13 +15,13 @@ endif # Generate Sphinx configuration file -config = configuration_data() -config.set('SERD_VERSION', meson.project_version()) -config.set('SERD_SRCDIR', serd_src_root) -config.set('SERD_TITLE', get_option('title')) +conf_config = configuration_data() +conf_config.set('SERD_SRCDIR', serd_src_root) +conf_config.set('SERD_TITLE', get_option('title')) +conf_config.set('SERD_VERSION', meson.project_version()) conf_py = configure_file( - configuration: config, + configuration: conf_config, input: files('../conf.py.in'), output: 'conf.py', ) @@ -57,28 +57,32 @@ endif # TODO: Add install_tag: 'doc' after requiring meson 0.60.0 -custom_target( - 'singlehtml', - build_by_default: true, - command: [ - sphinx_build, - '-M', 'singlehtml', '@OUTDIR@', '@OUTDIR@', '-t', 'singlehtml', - ] + sphinx_flags, - input: [c_rst_files, c_serd_rst, c_index_xml, conf_py], - install: true, - install_dir: docdir / versioned_name, - output: 'singlehtml', -) +if not get_option('singlehtml').disabled() + custom_target( + 'singlehtml', + build_by_default: true, + command: [ + sphinx_build, + '-M', 'singlehtml', '@OUTDIR@', '@OUTDIR@', '-t', 'singlehtml', + ] + sphinx_flags, + input: [c_rst_files, c_serd_rst, c_index_xml, conf_py], + install: true, + install_dir: docdir / versioned_name, + output: 'singlehtml', + ) +endif -custom_target( - 'html', - build_by_default: true, - command: [ - sphinx_build, - '-M', 'html', '@OUTDIR@', '@OUTDIR@', '-t', 'html', - ] + sphinx_flags, - input: [c_rst_files, c_serd_rst, c_index_xml, conf_py], - install: true, - install_dir: docdir / versioned_name, - output: 'html', -) +if not get_option('html').disabled() + custom_target( + 'html', + build_by_default: true, + command: [ + sphinx_build, + '-M', 'html', '@OUTDIR@', '@OUTDIR@', '-t', 'html', + ] + sphinx_flags, + input: [c_rst_files, c_serd_rst, c_index_xml, conf_py], + install: true, + install_dir: docdir / versioned_name, + output: 'html', + ) +endif |