diff options
author | David Robillard <d@drobilla.net> | 2022-06-27 12:59:34 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-07-10 13:39:53 -0400 |
commit | 5e78edf6e09373938a796cf44fb38d2309d04b4d (patch) | |
tree | e80618e5e092dcb3d9501a2568cf67489fe3d1bd /doc/meson.build | |
parent | bcc1c936b15782d8fa59e2ebf471cf686527135c (diff) | |
download | serd-5e78edf6e09373938a796cf44fb38d2309d04b4d.tar.gz serd-5e78edf6e09373938a796cf44fb38d2309d04b4d.tar.bz2 serd-5e78edf6e09373938a796cf44fb38d2309d04b4d.zip |
Switch to meson build system
Diffstat (limited to 'doc/meson.build')
-rw-r--r-- | doc/meson.build | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/doc/meson.build b/doc/meson.build new file mode 100644 index 00000000..13ce7f1d --- /dev/null +++ b/doc/meson.build @@ -0,0 +1,38 @@ +docdir = get_option('datadir') / 'doc' + +doxygen = find_program('doxygen', required: get_option('docs')) +dox_to_sphinx = files('../scripts/dox_to_sphinx.py') +sphinx_build = find_program('sphinx-build', required: get_option('docs')) +mandoc = find_program('mandoc', required: false) + +build_docs = doxygen.found() and sphinx_build.found() + +if build_docs + subdir('c') +endif + +mandoc_css = files('mandoc.css') + +if not get_option('tests').disabled() + stylelint = find_program('stylelint', required: false) + if stylelint.found() + test('stylelint', stylelint, args: [mandoc_css], suite: 'data') + endif +endif + +if mandoc.found() + configure_file(input: mandoc_css, output: '@PLAINNAME@', copy: true) + + serdi_html = custom_target( + 'serdi.html', + build_by_default: true, + capture: true, + command: [mandoc, '-Thtml', '-Werror', '-O', 'style=mandoc.css', '@INPUT@'], + input: files('serdi.1'), + output: 'serdi.html', + ) +endif + +if not meson.is_subproject() + summary('API Documentation', build_docs, bool_yn: true) +endif |