aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-10-04 18:51:25 +0200
committerPřemysl Eric Janouch <p@janouch.name>2022-10-09 01:24:03 +0200
commit0317b88c879db481611027dc5d2a853fee632b1a (patch)
treeba78427fe68168bde3dd6759dd5c8b6681329079 /meson.build
parent1431188e2704d5167ff3dd1e7d2e02db3a88795a (diff)
downloadfiv-0317b88c879db481611027dc5d2a853fee632b1a.tar.gz
fiv-0317b88c879db481611027dc5d2a853fee632b1a.tar.xz
fiv-0317b88c879db481611027dc5d2a853fee632b1a.zip
Don't require asciidoctor or a2x, import liberty
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build10
1 files changed, 9 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 6f6d156..befd2ed 100644
--- a/meson.build
+++ b/meson.build
@@ -217,9 +217,11 @@ if not win32
asciidoctor = find_program('asciidoctor', required : false)
a2x = find_program('a2x', required : false)
if not asciidoctor.found() and not a2x.found()
- error('Neither asciidoctor nor a2x were found')
+ warning('Neither asciidoctor nor a2x were found, ' +
+ 'falling back to a substandard manual page generator')
endif
foreach page : [meson.project_name()]
+ man_capture = false
if asciidoctor.found()
command = [asciidoctor, '-b', 'manpage',
'-a', 'release-version=' + meson.project_version(),
@@ -228,10 +230,16 @@ if not win32
command = [a2x, '--doctype', 'manpage', '--format', 'manpage',
'-a', 'release-version=' + meson.project_version(),
'-D', '@OUTDIR@', '@INPUT@']
+ else
+ command = ['env', 'LC_ALL=C',
+ 'asciidoc-release-version=' + meson.project_version(),
+ 'awk', '-f', files('liberty/tools/asciiman.awk'), '@INPUT@']
+ man_capture = true
endif
custom_target('manpage for ' + page,
input : 'docs' / page + '.adoc',
output : page + '.1',
+ capture : man_capture,
command : command,
install : true,
install_dir : get_option('mandir') / 'man1')