aboutsummaryrefslogtreecommitdiffstats
path: root/doc/c/meson.build
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-03-28 13:42:35 -0400
committerDavid Robillard <d@drobilla.net>2022-01-28 21:57:29 -0500
commitf8a59da9c492b7df38f53ba96505313e931d76cc (patch)
tree5bf1e44e67f8662894a37fbc84d770585f5957dd /doc/c/meson.build
parentac0ac05ccf96dee4406db8bdd4d098d3de61c01f (diff)
downloadserd-f8a59da9c492b7df38f53ba96505313e931d76cc.tar.gz
serd-f8a59da9c492b7df38f53ba96505313e931d76cc.tar.bz2
serd-f8a59da9c492b7df38f53ba96505313e931d76cc.zip
Add high-level documentation
Diffstat (limited to 'doc/c/meson.build')
-rw-r--r--doc/c/meson.build53
1 files changed, 49 insertions, 4 deletions
diff --git a/doc/c/meson.build b/doc/c/meson.build
index 4e044f97..02f5afc9 100644
--- a/doc/c/meson.build
+++ b/doc/c/meson.build
@@ -1,6 +1,20 @@
config = configuration_data()
config.set('SERD_VERSION', meson.project_version())
+if mandoc.found()
+ config.set('SERD_COMMAND_LINE_INDEX_ENTRY', '\n command_line_tools\n')
+ config.set('SERD_PIPE_LINK', '`serd-pipe <../../man/serd-pipe.html>`_')
+ config.set('SERD_SORT_LINK', '`serd-sort <../../man/serd-sort.html>`_')
+ config.set('SERD_FILTER_LINK', '`serd-filter <../../man/serd-filter.html>`_')
+ config.set('SERD_VALIDATE_LINK', '`serd-validate <../../man/serd-validate.html>`_')
+else
+ config.set('SERD_COMMAND_LINE_INDEX_ENTRY', '')
+ config.set('SERD_PIPE_LINK', '``serd-pipe``')
+ config.set('SERD_SORT_LINK', '``serd-sort``')
+ config.set('SERD_FILTER_LINK', '``serd-filter``')
+ config.set('SERD_VALIDATE_LINK', '``serd-validate``')
+endif
+
conf_py = configure_file(configuration: config,
input: files('../conf.py.in'),
output: 'conf.py')
@@ -9,11 +23,31 @@ configure_file(copy: true,
input: files('../summary.rst'),
output: 'summary.rst')
+configure_file(copy: true,
+ input: files('overview_code.c'),
+ output: 'overview_code.c')
+
+executable('overview_code', files('overview_code.c'), dependencies: [serd_dep])
+
c_rst_files = files(
+ '../data_model.rst',
+ '../getting_started.rst',
'index.rst',
+ 'model.rst',
+ 'nodes.rst',
'overview.rst',
+ 'reading_and_writing.rst',
+ 'statements.rst',
+ 'stream_processing.rst',
+ 'string_views.rst',
+ 'using_serd.rst',
+ 'world.rst',
)
+configure_file(configuration: config,
+ input: files('../command_line_tools.rst.in'),
+ output: 'command_line_tools.rst')
+
foreach f : c_rst_files
configure_file(copy: true, input: f, output: '@PLAINNAME@')
endforeach
@@ -22,10 +56,10 @@ subdir('xml')
subdir('api')
docs = custom_target(
- 'singlehtml documentation for serd',
+ 'singlehtml C documentation for serd',
command: [sphinx_build, '-M', 'singlehtml',
meson.current_build_dir(), meson.current_build_dir(),
- '-E', '-q', '-t', 'singlehtml'],
+ '-W', '-E', '-a', '-q', '-t', 'singlehtml'],
input: [c_rst_files, c_serd_rst, c_index_xml],
output: 'singlehtml',
build_by_default: true,
@@ -33,12 +67,23 @@ docs = custom_target(
install_dir: docdir / versioned_name)
docs = custom_target(
- 'html documentation for serd',
+ 'html C documentation for serd',
command: [sphinx_build, '-M', 'html',
meson.current_build_dir(), meson.current_build_dir(),
- '-E', '-q', '-t', 'html'],
+ '-W', '-E', '-a', '-q', '-t', 'html'],
input: [c_rst_files, c_serd_rst, c_index_xml],
output: 'html',
build_by_default: true,
install: true,
install_dir: docdir / versioned_name)
+
+docs = custom_target(
+ 'epub C documentation for serd',
+ command: [sphinx_build, '-M', 'epub',
+ meson.current_build_dir(), meson.current_build_dir(),
+ '-W', '-E', '-a', '-q', '-t', 'epub'],
+ input: [c_rst_files, c_serd_rst, c_index_xml],
+ output: 'epub',
+ build_by_default: true,
+ install: true,
+ install_dir: docdir / versioned_name)