aboutsummaryrefslogtreecommitdiffstats
path: root/doc/man/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'doc/man/meson.build')
-rw-r--r--doc/man/meson.build39
1 files changed, 39 insertions, 0 deletions
diff --git a/doc/man/meson.build b/doc/man/meson.build
new file mode 100644
index 00000000..fe970889
--- /dev/null
+++ b/doc/man/meson.build
@@ -0,0 +1,39 @@
+if get_option('tools')
+ # Install tool man pages
+ install_man('serd-filter.1')
+ install_man('serd-pipe.1')
+ install_man('serd-sort.1')
+ install_man('serd-validate.1')
+
+ # Build/install HTML man pages if mandoc is present
+ if mandoc.found()
+ configure_file(copy: true,
+ input: files('mandoc.css'),
+ output: 'mandoc.css',
+ # install: true,
+ install_dir: docdir / versioned_name / 'man')
+
+ mandoc_html_command = [mandoc,
+ '-Thtml',
+ '-Wwarning',
+ '-Ostyle=mandoc.css,man=%N.html',
+ '@INPUT@']
+
+ page_names = [
+ 'serd-filter',
+ 'serd-pipe',
+ 'serd-sort',
+ 'serd-validate',
+ ]
+
+ foreach name : page_names
+ custom_target(name + '.1',
+ capture: true,
+ command: mandoc_html_command,
+ input: files(name + '.1'),
+ install: true,
+ install_dir: docdir / versioned_name / 'man',
+ output: name + '.html')
+ endforeach
+ endif
+endif