aboutsummaryrefslogtreecommitdiffstats
path: root/doc/ns
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ns')
-rw-r--r--doc/ns/ext/meson.build68
-rw-r--r--doc/ns/extensions/meson.build49
-rw-r--r--doc/ns/meson.build83
3 files changed, 200 insertions, 0 deletions
diff --git a/doc/ns/ext/meson.build b/doc/ns/ext/meson.build
new file mode 100644
index 0000000..bf6431b
--- /dev/null
+++ b/doc/ns/ext/meson.build
@@ -0,0 +1,68 @@
+# Copyright 2022 David Robillard <d@drobilla.net>
+# SPDX-License-Identifier: 0BSD OR ISC
+
+config = configuration_data({'BASE': '/ns/ext'})
+
+if get_option('online_docs')
+ htaccess = configure_file(
+ configuration: config,
+ input: files('..' / '..' / 'htaccess.in'),
+ install_dir: lv2_docdir / 'ns' / 'ext',
+ output: '.htaccess',
+ )
+endif
+
+spec_names = [
+ 'atom',
+ 'buf-size',
+ 'data-access',
+ 'dynmanifest',
+ 'event',
+ 'instance-access',
+ 'log',
+ 'midi',
+ 'morph',
+ 'options',
+ 'parameters',
+ 'patch',
+ 'port-groups',
+ 'port-props',
+ 'presets',
+ 'resize-port',
+ 'state',
+ 'time',
+ 'uri-map',
+ 'urid',
+ 'worker',
+]
+
+if build_docs
+ foreach name : spec_names
+ spec_file = files(lv2_source_root / 'lv2' / name + '.lv2' / name + '.ttl')
+
+ custom_target(
+ name + '.html',
+ command: lv2specgen_command_prefix + [
+ '--docdir=../../c/html',
+ '--style-uri=../../style/style.css',
+ ] + [
+ '@INPUT@',
+ '@OUTPUT@',
+ ],
+ depends: doc_deps,
+ input: spec_file,
+ install: true,
+ install_dir: lv2_docdir / 'ns' / 'ext',
+ output: name + '.html',
+ )
+
+ if get_option('online_docs')
+ configure_file(
+ copy: true,
+ input: spec_file,
+ install_dir: lv2_docdir / 'ns' / 'ext',
+ output: '@PLAINNAME@',
+ )
+ endif
+ endforeach
+endif
diff --git a/doc/ns/extensions/meson.build b/doc/ns/extensions/meson.build
new file mode 100644
index 0000000..837f736
--- /dev/null
+++ b/doc/ns/extensions/meson.build
@@ -0,0 +1,49 @@
+# Copyright 2022 David Robillard <d@drobilla.net>
+# SPDX-License-Identifier: 0BSD OR ISC
+
+config = configuration_data({'BASE': '/ns/extensions'})
+
+if get_option('online_docs')
+ htaccess = configure_file(
+ configuration: config,
+ input: files('..' / '..' / 'htaccess.in'),
+ install_dir: lv2_docdir / 'ns' / 'extensions',
+ output: '.htaccess',
+ )
+endif
+
+spec_names = [
+ 'ui',
+ 'units',
+]
+
+if build_docs
+ foreach name : spec_names
+ spec_file = files(lv2_source_root / 'lv2' / name + '.lv2' / name + '.ttl')
+
+ custom_target(
+ name + '.html',
+ command: lv2specgen_command_prefix + [
+ '--docdir=../../c/html',
+ '--style-uri=../../style/style.css',
+ ] + [
+ '@INPUT@',
+ '@OUTPUT@',
+ ],
+ depends: doc_deps,
+ input: spec_file,
+ install: true,
+ install_dir: lv2_docdir / 'ns' / 'extensions',
+ output: name + '.html',
+ )
+
+ if get_option('online_docs')
+ configure_file(
+ copy: true,
+ input: spec_file,
+ install_dir: lv2_docdir / 'ns' / 'ext',
+ output: '@PLAINNAME@',
+ )
+ endif
+ endforeach
+endif
diff --git a/doc/ns/meson.build b/doc/ns/meson.build
new file mode 100644
index 0000000..126a100
--- /dev/null
+++ b/doc/ns/meson.build
@@ -0,0 +1,83 @@
+# Copyright 2022 David Robillard <d@drobilla.net>
+# SPDX-License-Identifier: 0BSD OR ISC
+
+config = configuration_data({'BASE': '/ns'})
+
+if get_option('online_docs')
+ htaccess = configure_file(
+ configuration: config,
+ input: files('..' / 'htaccess.in'),
+ install_dir: lv2_docdir / 'ns',
+ output: '.htaccess',
+ )
+endif
+
+######################
+# Core Documentation #
+######################
+
+if build_docs
+ spec_file = files(lv2_source_root / 'lv2' / 'core.lv2' / 'lv2core.ttl')
+
+ lv2_core_docs = custom_target(
+ 'lv2core.html',
+ command: lv2specgen_command_prefix + [
+ '--docdir=../c/html',
+ '--style-uri=../style/style.css',
+ ] + [
+ '@INPUT@',
+ '@OUTPUT@',
+ ],
+ input: spec_file,
+ output: 'lv2core.html',
+ depends: doc_deps,
+ install: true,
+ install_dir: lv2_docdir / 'ns',
+ )
+
+ if get_option('online_docs')
+ configure_file(
+ copy: true,
+ input: spec_file,
+ install_dir: lv2_docdir / 'ns' / 'ext',
+ output: '@PLAINNAME@',
+ )
+ endif
+endif
+
+###########################
+# Extension Documentation #
+###########################
+
+subdir('ext')
+subdir('extensions')
+
+#########
+# Index #
+#########
+
+lv2_build_index = find_program(
+ lv2_source_root / 'scripts' / 'lv2_build_index.py',
+)
+
+lv2_build_index_command = [
+ lv2_build_index,
+ ['--lv2-version', meson.project_version()],
+ ['--lv2-source-root', lv2_source_root],
+]
+
+if get_option('online_docs')
+ lv2_build_index_command += [
+ '--online',
+ ]
+endif
+
+index = custom_target(
+ 'index.html',
+ capture: true,
+ command: lv2_build_index_command + ['@INPUT@'],
+ input: spec_files,
+ install: true,
+ install_dir: lv2_docdir / 'ns',
+ output: 'index.html',
+)