diff options
author | David Robillard <d@drobilla.net> | 2022-07-07 18:59:32 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-07-17 18:14:00 -0400 |
commit | 1eccbe4355685b322194df72b5de2382d5290b3b (patch) | |
tree | 0677b5c2f577a5024c351a164527f4bdd91a639b /doc/ns | |
parent | d4a970f6962dda28133290194832b726b566ddab (diff) | |
download | lv2-1eccbe4355685b322194df72b5de2382d5290b3b.tar.xz |
Rearrange source tree to be directly usable by dependants
This allows the LV2 source distribution to be used as an include path for
compilers and an LV2_PATH for applications, at the expense of self-contained
bundles. That's a nice idea, but it made LV2 itself weird and annoying to
depend on. This rearranges things so that directories in the source tree
correspond more closely to installation directories.
To make this possible, the "aux" directory in the documentation output has been
changed to "style", to avoid the reserved name "aux" on Windows.
Diffstat (limited to 'doc/ns')
-rw-r--r-- | doc/ns/ext/meson.build | 54 | ||||
-rw-r--r-- | doc/ns/extensions/meson.build | 35 | ||||
-rw-r--r-- | doc/ns/meson.build | 59 |
3 files changed, 142 insertions, 6 deletions
diff --git a/doc/ns/ext/meson.build b/doc/ns/ext/meson.build index 4a2ca1f..f6ad06b 100644 --- a/doc/ns/ext/meson.build +++ b/doc/ns/ext/meson.build @@ -11,3 +11,57 @@ if get_option('online_docs') 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 index b54e3d2..5a25184 100644 --- a/doc/ns/extensions/meson.build +++ b/doc/ns/extensions/meson.build @@ -11,3 +11,38 @@ if get_option('online_docs') 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 index 26471b9..bb471c9 100644 --- a/doc/ns/meson.build +++ b/doc/ns/meson.build @@ -12,20 +12,67 @@ if get_option('online_docs') ) 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 = files(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, - '--lv2-version', meson.project_version(), - '--lv2-source-root', lv2_source_root, - '@INPUT@' - ], + command: lv2_build_index_command + ['@INPUT@'], input: spec_files, install: true, install_dir: lv2_docdir / 'ns', |