diff options
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 |