aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-07-07 18:59:06 -0400
committerDavid Robillard <d@drobilla.net>2022-07-17 18:13:53 -0400
commitd4a970f6962dda28133290194832b726b566ddab (patch)
treecfe9747042d55388705371a8ce95505ffb702470 /doc
parent7f3a2651a3635232d94f7bf9ce23d6b575735732 (diff)
downloadlv2-d4a970f6962dda28133290194832b726b566ddab.tar.xz
Switch to meson build system
Diffstat (limited to 'doc')
-rw-r--r--doc/c/doxy-style.css (renamed from doc/doxy-style.css)0
-rw-r--r--doc/c/footer.html (renamed from doc/footer.html)0
-rw-r--r--doc/c/header.html (renamed from doc/header.html)0
-rw-r--r--doc/c/layout.xml (renamed from doc/layout.xml)0
-rw-r--r--doc/c/mainpage.md (renamed from doc/mainpage.md)0
-rw-r--r--doc/c/meson.build41
-rw-r--r--doc/c/reference.doxygen.in (renamed from doc/reference.doxygen.in)18
-rw-r--r--doc/meson.build23
-rw-r--r--doc/ns/ext/meson.build13
-rw-r--r--doc/ns/extensions/meson.build13
-rw-r--r--doc/ns/meson.build33
11 files changed, 132 insertions, 9 deletions
diff --git a/doc/doxy-style.css b/doc/c/doxy-style.css
index b44675e..b44675e 100644
--- a/doc/doxy-style.css
+++ b/doc/c/doxy-style.css
diff --git a/doc/footer.html b/doc/c/footer.html
index 0dc6919..0dc6919 100644
--- a/doc/footer.html
+++ b/doc/c/footer.html
diff --git a/doc/header.html b/doc/c/header.html
index 2e419e3..2e419e3 100644
--- a/doc/header.html
+++ b/doc/c/header.html
diff --git a/doc/layout.xml b/doc/c/layout.xml
index 1f63a76..1f63a76 100644
--- a/doc/layout.xml
+++ b/doc/c/layout.xml
diff --git a/doc/mainpage.md b/doc/c/mainpage.md
index 561bc93..561bc93 100644
--- a/doc/mainpage.md
+++ b/doc/c/mainpage.md
diff --git a/doc/c/meson.build b/doc/c/meson.build
new file mode 100644
index 0000000..3ce7fdc
--- /dev/null
+++ b/doc/c/meson.build
@@ -0,0 +1,41 @@
+# Copyright 2022 David Robillard <d@drobilla.net>
+# SPDX-License-Identifier: CC0-1.0 OR ISC
+
+lv2_source_doc = meson.current_source_dir()
+
+if doxygen.found()
+ reference_doxygen_in = files('reference.doxygen.in')
+
+ config = configuration_data(
+ {
+ 'LV2_SRCDIR': lv2_source_root,
+ 'LV2_BUILDDIR': lv2_build_root,
+ 'LV2_VERSION': meson.project_version(),
+ }
+ )
+
+ reference_doxygen = configure_file(
+ configuration: config,
+ input: reference_doxygen_in,
+ output: 'reference.doxygen',
+ )
+
+ docs = custom_target(
+ 'html',
+ command: [doxygen, '@INPUT@'],
+ input: reference_doxygen,
+ install: true,
+ install_dir: lv2_docdir,
+ output: ['html', 'tags'],
+ )
+
+ # TODO: doc_deps is needed because Meson did not support using custom target
+ # outputs as dependencies until 0.60.0. When 0.60.0 is required, this can be
+ # cleaned up by removing doc_deps and using lv2_tags (not its path) as a
+ # command argument, which Meson will correctly make a dependency for.
+
+ lv2_tags = docs[1]
+ doc_deps = [docs]
+else
+ doc_deps = []
+endif
diff --git a/doc/reference.doxygen.in b/doc/c/reference.doxygen.in
index 5efb066..6318484 100644
--- a/doc/reference.doxygen.in
+++ b/doc/c/reference.doxygen.in
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
-OUTPUT_DIRECTORY = .
+OUTPUT_DIRECTORY = @LV2_BUILDDIR@
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -762,7 +762,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE = @LV2_SRCDIR@/doc/layout.xml
+LAYOUT_FILE = @LV2_SRCDIR@/doc/c/layout.xml
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
# the reference definitions. This must be a list of .bib files. The .bib
@@ -864,7 +864,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = @LV2_SRCDIR@/doc/mainpage.md \
+INPUT = @LV2_SRCDIR@/doc/c/mainpage.md \
@LV2_SRCDIR@/lv2/atom/atom.h \
@LV2_SRCDIR@/lv2/atom/forge.h \
@LV2_SRCDIR@/lv2/atom/util.h \
@@ -1045,7 +1045,7 @@ FILTER_SOURCE_PATTERNS =
# (index.html). This can be useful if you have a project on for instance GitHub
# and want to reuse the introduction page also for the doxygen output.
-USE_MDFILE_AS_MAINPAGE = @LV2_SRCDIR@/doc/mainpage.md
+USE_MDFILE_AS_MAINPAGE = @LV2_SRCDIR@/doc/c/mainpage.md
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1167,7 +1167,7 @@ GENERATE_HTML = YES
# The default directory is: html.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_OUTPUT = html
+HTML_OUTPUT = @LV2_BUILDDIR@/doc/c/html
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
# generated HTML page (for example: .htm, .php, .asp).
@@ -1194,7 +1194,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER = @LV2_SRCDIR@/doc/header.html
+HTML_HEADER = @LV2_SRCDIR@/doc/c/header.html
# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
# generated HTML page. If the tag is left blank doxygen will generate a standard
@@ -1204,7 +1204,7 @@ HTML_HEADER = @LV2_SRCDIR@/doc/header.html
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER = @LV2_SRCDIR@/doc/footer.html
+HTML_FOOTER = @LV2_SRCDIR@/doc/c/footer.html
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
# sheet that is used by each HTML page. It can be used to fine-tune the look of
@@ -1216,7 +1216,7 @@ HTML_FOOTER = @LV2_SRCDIR@/doc/footer.html
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET = @LV2_SRCDIR@/doc/doxy-style.css
+HTML_STYLESHEET = @LV2_SRCDIR@/doc/c/doxy-style.css
# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
# cascading style sheets that are included after the standard style sheets
@@ -2270,7 +2270,7 @@ TAGFILES =
# tag file that is based on the input files it reads. See section "Linking to
# external documentation" for more information about the usage of tag files.
-GENERATE_TAGFILE = tags
+GENERATE_TAGFILE = @LV2_BUILDDIR@/doc/c/tags
# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
# the class index. If set to NO, only the inherited external classes will be
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644
index 0000000..230211e
--- /dev/null
+++ b/doc/meson.build
@@ -0,0 +1,23 @@
+# Copyright 2022 David Robillard <d@drobilla.net>
+# SPDX-License-Identifier: CC0-1.0 OR ISC
+
+if doxygen.found()
+ aux_files = files(
+ 'pygments.css',
+ 'style.css'
+ )
+
+ foreach file : aux_files
+ configure_file(
+ input: file,
+ output: '@PLAINNAME@',
+ copy: true,
+ install_dir: lv2_docdir / 'aux')
+ endforeach
+
+ subdir('ns')
+
+ build_docs = true
+else
+ build_docs = false
+endif
diff --git a/doc/ns/ext/meson.build b/doc/ns/ext/meson.build
new file mode 100644
index 0000000..4a2ca1f
--- /dev/null
+++ b/doc/ns/ext/meson.build
@@ -0,0 +1,13 @@
+# Copyright 2022 David Robillard <d@drobilla.net>
+# SPDX-License-Identifier: CC0-1.0 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
diff --git a/doc/ns/extensions/meson.build b/doc/ns/extensions/meson.build
new file mode 100644
index 0000000..b54e3d2
--- /dev/null
+++ b/doc/ns/extensions/meson.build
@@ -0,0 +1,13 @@
+# Copyright 2022 David Robillard <d@drobilla.net>
+# SPDX-License-Identifier: CC0-1.0 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
diff --git a/doc/ns/meson.build b/doc/ns/meson.build
new file mode 100644
index 0000000..26471b9
--- /dev/null
+++ b/doc/ns/meson.build
@@ -0,0 +1,33 @@
+# Copyright 2022 David Robillard <d@drobilla.net>
+# SPDX-License-Identifier: CC0-1.0 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
+
+subdir('ext')
+subdir('extensions')
+
+lv2_build_index = files(lv2_source_root / 'scripts' / 'lv2_build_index.py')
+
+index = custom_target(
+ 'index.html',
+ capture: true,
+ command: [
+ lv2_build_index,
+ '--lv2-version', meson.project_version(),
+ '--lv2-source-root', lv2_source_root,
+ '@INPUT@'
+ ],
+ input: spec_files,
+ install: true,
+ install_dir: lv2_docdir / 'ns',
+ output: 'index.html',
+)