aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/man/mandoc.css (renamed from doc/mandoc.css)0
-rw-r--r--doc/man/meson.build39
-rw-r--r--doc/man/serd-filter.1 (renamed from doc/serd-filter.1)0
-rw-r--r--doc/man/serd-pipe.1 (renamed from doc/serd-pipe.1)0
-rw-r--r--doc/man/serd-sort.1 (renamed from doc/serd-sort.1)0
-rw-r--r--doc/man/serd-validate.1 (renamed from doc/serd-validate.1)0
-rw-r--r--doc/meson.build1
-rw-r--r--meson.build9
8 files changed, 43 insertions, 6 deletions
diff --git a/doc/mandoc.css b/doc/man/mandoc.css
index cebb50bf..cebb50bf 100644
--- a/doc/mandoc.css
+++ b/doc/man/mandoc.css
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
diff --git a/doc/serd-filter.1 b/doc/man/serd-filter.1
index e05559e2..e05559e2 100644
--- a/doc/serd-filter.1
+++ b/doc/man/serd-filter.1
diff --git a/doc/serd-pipe.1 b/doc/man/serd-pipe.1
index d94d4445..d94d4445 100644
--- a/doc/serd-pipe.1
+++ b/doc/man/serd-pipe.1
diff --git a/doc/serd-sort.1 b/doc/man/serd-sort.1
index 7fb02978..7fb02978 100644
--- a/doc/serd-sort.1
+++ b/doc/man/serd-sort.1
diff --git a/doc/serd-validate.1 b/doc/man/serd-validate.1
index 3d8c0035..3d8c0035 100644
--- a/doc/serd-validate.1
+++ b/doc/man/serd-validate.1
diff --git a/doc/meson.build b/doc/meson.build
index 5555cfbb..870ff308 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -15,3 +15,4 @@ if not meson.is_subproject() and meson.version().version_compare('>=0.53.0')
summary('Documentation', build_docs, bool_yn: true)
endif
+subdir('man')
diff --git a/meson.build b/meson.build
index 63a9ece5..352c1734 100644
--- a/meson.build
+++ b/meson.build
@@ -140,6 +140,9 @@ if host_machine.system() != 'windows'
]
endif
+# Programs used by the build
+mandoc = find_program('mandoc', required: false)
+
# Determine library type and the flags needed to build it
library_name = versioned_name
if get_option('default_library') == 'both'
@@ -243,12 +246,6 @@ pkg.generate(
# Build command line tools
if get_option('tools')
subdir('tools')
-
- if not get_option('docs').disabled()
- install_man('doc/serd-filter.1')
- install_man('doc/serd-pipe.1')
- install_man('doc/serd-sort.1')
- endif
endif
# Install header to a versioned include directory