summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/meson.build36
-rw-r--r--doc/reference.doxygen.in4
2 files changed, 38 insertions, 2 deletions
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644
index 0000000..a354f30
--- /dev/null
+++ b/doc/meson.build
@@ -0,0 +1,36 @@
+docdir = get_option('datadir') / 'doc'
+
+doxygen = find_program('doxygen', required: get_option('docs'))
+
+build_docs = doxygen.found()
+
+if build_docs
+ config = configuration_data()
+ config.set('SORD_VERSION', meson.project_version())
+ config.set('SORD_SRCDIR', sord_src_root)
+ config.set('DOX_OUTPUT', meson.current_build_dir())
+
+ c_doxyfile = configure_file(
+ configuration: config,
+ input: files('reference.doxygen.in'),
+ output: 'reference.doxygen',
+ )
+
+ custom_target(
+ 'html',
+ build_by_default: true,
+ command: [doxygen, '@INPUT0@'],
+ input: [c_doxyfile] + c_headers,
+ install: true,
+ install_dir: docdir / versioned_name,
+ output: 'html',
+ )
+endif
+
+if not get_option('docs').disabled()
+ install_man(files('sord_validate.1', 'sordi.1'))
+endif
+
+if not meson.is_subproject()
+ summary('API Documentation', build_docs, bool_yn: true)
+endif
diff --git a/doc/reference.doxygen.in b/doc/reference.doxygen.in
index 9a685c5..a9e62eb 100644
--- a/doc/reference.doxygen.in
+++ b/doc/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 = @DOX_OUTPUT@
# 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
@@ -1788,7 +1788,7 @@ RTF_EXTENSIONS_FILE =
# classes and files.
# The default value is: NO.
-GENERATE_MAN = YES
+GENERATE_MAN = NO
# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of