From 68293752dbfd80016dc7543b88f22c602427fa75 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 17 Jul 2022 17:45:43 -0400 Subject: Switch to meson build system --- doc/c/Doxyfile | 26 -------------------------- doc/c/Doxyfile.in | 28 ++++++++++++++++++++++++++++ doc/c/api/meson.build | 6 ++++++ doc/c/index.rst | 9 +++++++-- doc/c/meson.build | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ doc/c/wscript | 39 --------------------------------------- doc/c/xml/meson.build | 18 ++++++++++++++++++ doc/meson.build | 15 +++++++++++++++ doc/suil.rst | 14 -------------- doc/summary.rst | 10 ++++++++++ 10 files changed, 132 insertions(+), 81 deletions(-) delete mode 100644 doc/c/Doxyfile create mode 100644 doc/c/Doxyfile.in create mode 100644 doc/c/api/meson.build create mode 100644 doc/c/meson.build delete mode 100644 doc/c/wscript create mode 100644 doc/c/xml/meson.build create mode 100644 doc/meson.build delete mode 100644 doc/suil.rst create mode 100644 doc/summary.rst (limited to 'doc') diff --git a/doc/c/Doxyfile b/doc/c/Doxyfile deleted file mode 100644 index ee7a427..0000000 --- a/doc/c/Doxyfile +++ /dev/null @@ -1,26 +0,0 @@ -PROJECT_NAME = Suil -PROJECT_BRIEF = "A library for loading LV2 plugin UIs" - -QUIET = YES -WARN_AS_ERROR = NO -WARN_IF_UNDOCUMENTED = NO -WARN_NO_PARAMDOC = NO - -JAVADOC_AUTOBRIEF = YES - -CASE_SENSE_NAMES = YES -HIDE_IN_BODY_DOCS = YES -REFERENCES_LINK_SOURCE = NO - -GENERATE_HTML = NO -GENERATE_LATEX = NO -GENERATE_XML = YES -XML_PROGRAMLISTING = NO -SHOW_FILES = NO - -MACRO_EXPANSION = YES -PREDEFINED = SUIL_API \ - -INPUT = ../../include/suil/suil.h - -OUTPUT_DIRECTORY = . diff --git a/doc/c/Doxyfile.in b/doc/c/Doxyfile.in new file mode 100644 index 0000000..326308b --- /dev/null +++ b/doc/c/Doxyfile.in @@ -0,0 +1,28 @@ +PROJECT_NAME = Suil +PROJECT_BRIEF = "A library for loading LV2 plugin UIs" + +QUIET = YES +WARN_AS_ERROR = NO +WARN_IF_UNDOCUMENTED = NO +WARN_NO_PARAMDOC = NO + +JAVADOC_AUTOBRIEF = YES + +CASE_SENSE_NAMES = YES +HIDE_IN_BODY_DOCS = YES +REFERENCES_LINK_SOURCE = NO + +GENERATE_HTML = NO +GENERATE_LATEX = NO +GENERATE_XML = YES +XML_PROGRAMLISTING = NO +SHOW_FILES = NO + +MACRO_EXPANSION = YES +PREDEFINED = SUIL_API + +RECURSIVE = YES +STRIP_FROM_PATH = @SUIL_SRCDIR@ +INPUT = @SUIL_SRCDIR@/include + +OUTPUT_DIRECTORY = @DOX_OUTPUT@ diff --git a/doc/c/api/meson.build b/doc/c/api/meson.build new file mode 100644 index 0000000..4a9340f --- /dev/null +++ b/doc/c/api/meson.build @@ -0,0 +1,6 @@ +c_suil_rst = custom_target( + 'suil.rst', + command: [dox_to_sphinx, '-f', '@INPUT0@', '@OUTDIR@'], + input: [c_index_xml] + c_rst_files, + output: 'suil.rst', +) diff --git a/doc/c/index.rst b/doc/c/index.rst index b616761..1aefcb1 100644 --- a/doc/c/index.rst +++ b/doc/c/index.rst @@ -1,5 +1,10 @@ +#### +Suil +#### + +.. include:: summary.rst + .. toctree:: - suil overview - reference + api/suil diff --git a/doc/c/meson.build b/doc/c/meson.build new file mode 100644 index 0000000..64d1f4c --- /dev/null +++ b/doc/c/meson.build @@ -0,0 +1,48 @@ +config = configuration_data() +config.set('SUIL_VERSION', meson.project_version()) + +conf_py = configure_file( + configuration: config, + input: files('../conf.py.in'), + output: 'conf.py', +) + +configure_file( + copy: true, + input: files('../summary.rst'), + output: 'summary.rst', +) + +c_rst_files = files( + 'index.rst', + 'overview.rst', +) + +foreach f : c_rst_files + configure_file(copy: true, input: f, output: '@PLAINNAME@') +endforeach + +subdir('xml') +subdir('api') + +docs = custom_target( + 'singlehtml', + build_by_default: true, + command: [sphinx_build, '-M', 'singlehtml', '@OUTDIR@', '@OUTDIR@', + '-E', '-q', '-t', 'singlehtml'], + input: [c_rst_files, c_suil_rst, c_index_xml], + install: true, + install_dir: docdir / 'suil-0', + output: 'singlehtml', +) + +docs = custom_target( + 'html', + build_by_default: true, + command: [sphinx_build, '-M', 'html', '@OUTDIR@', '@OUTDIR@', + '-E', '-q', '-t', 'html'], + input: [c_rst_files, c_suil_rst, c_index_xml], + install: true, + install_dir: docdir / 'suil-0', + output: 'html', +) diff --git a/doc/c/wscript b/doc/c/wscript deleted file mode 100644 index ae074bc..0000000 --- a/doc/c/wscript +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python - -def build(bld): - dox_to_sphinx = bld.path.find_node("../../scripts/dox_to_sphinx.py") - index_xml = bld.path.get_bld().make_node("xml/index.xml") - - files = [ - ("../suil.rst", "sphinx/suil.rst"), - ("index.rst", "sphinx/index.rst"), - ("overview.rst", "sphinx/overview.rst"), - ("reference.rst", "sphinx/reference.rst"), - ] - - # Run Doxygen to generate XML documentation - bld(features="doxygen", doxyfile="Doxyfile") - - # Substitute variables to make Sphinx configuration file - bld(features="subst", - source="../conf.py.in", - target="sphinx/conf.py", - SERD_VERSION=bld.env.SERD_VERSION) - - # Copy static documentation files to Sphinx build directory - for f in files: - bld(features="subst", is_copy=True, source=f[0], target=f[1]) - - # Generate Sphinx markup from Doxygen XML - bld.add_group() - bld(rule="${PYTHON} " + dox_to_sphinx.abspath() + " -f ${SRC} ${TGT}", - source=index_xml, - target="sphinx/api/") - - # Run Sphinx to generate HTML documentation - doc_dir = bld.env.DOCDIR + "/suil-%s/" % bld.env.SUIL_MAJOR_VERSION - bld(features="sphinx", - sphinx_source=bld.path.get_bld().make_node("sphinx"), - sphinx_output_format="singlehtml", - sphinx_options=["-E", "-q", "-t", "singlehtml"], - install_path=doc_dir + "c/singlehtml/") diff --git a/doc/c/xml/meson.build b/doc/c/xml/meson.build new file mode 100644 index 0000000..c6c454e --- /dev/null +++ b/doc/c/xml/meson.build @@ -0,0 +1,18 @@ +doxygen = find_program('doxygen') + +config = configuration_data() +config.set('SUIL_SRCDIR', suil_src_root) +config.set('DOX_OUTPUT', meson.current_build_dir() / '..') + +c_doxyfile = configure_file( + configuration: config, + input: files('../Doxyfile.in'), + output: 'Doxyfile', +) + +c_index_xml = custom_target( + 'index.xml', + command: [doxygen, '@INPUT0@'], + input: [c_doxyfile] + c_headers, + output: 'index.xml', +) diff --git a/doc/meson.build b/doc/meson.build new file mode 100644 index 0000000..46fc3bb --- /dev/null +++ b/doc/meson.build @@ -0,0 +1,15 @@ +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')) + +build_docs = doxygen.found() and sphinx_build.found() + +if build_docs + subdir('c') +endif + +if not meson.is_subproject() + summary('Documentation', build_docs, bool_yn: true) +endif diff --git a/doc/suil.rst b/doc/suil.rst deleted file mode 100644 index c5dc5ab..0000000 --- a/doc/suil.rst +++ /dev/null @@ -1,14 +0,0 @@ -#### -Suil -#### - -Suil is a library for loading and wrapping LV2 plugin UIs. - -With Suil, -a host written in one supported toolkit can embed a plugin UI written in another. -Suil insulates hosts from toolkit libraries used by plugin UIs. -For example, -a Gtk host can embed a Qt UI without linking against Qt at compile time. - -Suil also handles the embedding of native platform UIs (which are recommended) in common toolkits, -for example embedding an X11 UI in a Gtk host. diff --git a/doc/summary.rst b/doc/summary.rst new file mode 100644 index 0000000..fa94886 --- /dev/null +++ b/doc/summary.rst @@ -0,0 +1,10 @@ +Suil is a library for loading and wrapping LV2 plugin UIs. + +With Suil, +a host written in one supported toolkit can embed a plugin UI written in another. +Suil insulates hosts from toolkit libraries used by plugin UIs. +For example, +a Gtk host can embed a Qt UI without linking against Qt at compile time. + +Suil also handles the embedding of native platform UIs (which are recommended) in common toolkits, +for example embedding an X11 UI in a Gtk host. -- cgit v1.2.1