aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-05-12 09:30:00 -0400
committerGitHub <noreply@github.com>2018-05-12 09:30:00 -0400
commite2b8eac4bfbe119eaeb20622b6f5326e76aafb0b (patch)
tree01ef02dca7eb448d9a6f2eb63bf60dfcd83ee86b /meson.build
parent50298dc9018e0045f7173a380c3d618c5f89cd43 (diff)
parent867190e0828a139fa4529cde60d033a9389df42c (diff)
Merge branch 'master' into wlroots-970
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build30
1 files changed, 14 insertions, 16 deletions
diff --git a/meson.build b/meson.build
index f59d29b3..a1f406ec 100644
--- a/meson.build
+++ b/meson.build
@@ -40,7 +40,6 @@ libpam = cc.find_library('pam')
math = cc.find_library('m')
rt = cc.find_library('rt')
git = find_program('git', required: false)
-a2x = find_program('a2x', required: false)
conf_data = configuration_data()
@@ -48,31 +47,30 @@ if gdk_pixbuf.found()
conf_data.set('HAVE_GDK_PIXBUF', true)
endif
-if a2x.found()
+scdoc = find_program('scdoc', required: false)
+
+if scdoc.found()
+ sh = find_program('sh')
mandir = get_option('mandir')
man_files = [
- 'sway/sway.1.txt',
- 'sway/sway.5.txt',
- 'sway/sway-bar.5.txt',
- 'sway/sway-input.5.txt',
- 'sway/sway-security.7.txt',
- 'swaymsg/swaymsg.1.txt',
+ 'sway/sway.1.scd',
+ 'sway/sway.5.scd',
+ 'sway/sway-bar.5.scd',
+ 'sway/sway-input.5.scd',
+ 'swaylock/swaylock.1.scd',
+ 'swaymsg/swaymsg.1.scd',
]
foreach filename : man_files
topic = filename.split('.')[-3].split('/')[-1]
section = filename.split('.')[-2]
+ output = '@0@.@1@'.format(topic, section)
custom_target(
- 'man-@0@-@1@'.format(topic, section),
+ output,
input: filename,
- output: '@BASENAME@',
+ output: output,
command: [
- a2x,
- '--no-xmllint',
- '--doctype', 'manpage',
- '--format', 'manpage',
- '--destination-dir', meson.current_build_dir(),
- '@INPUT@'
+ sh, '-c', '@0@ < @INPUT@ > @1@'.format(scdoc.path(), output)
],
install: true,
install_dir: '@0@/man@1@'.format(mandir, section)