From 4f44a3b2bd3d09b0875589422293aeb0651343dd Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 13 Jan 2019 21:24:33 -0500 Subject: Add README.md, compile man pages --- meson.build | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 71d2f78..b680c1a 100644 --- a/meson.build +++ b/meson.build @@ -175,3 +175,27 @@ else rename: 'swaylock' ) endif + +if scdoc.found() + sh = find_program('sh') + mandir = get_option('mandir') + man_files = [ + 'swaylock.1.scd', + ] + foreach filename : man_files + topic = filename.split('.')[-3].split('/')[-1] + section = filename.split('.')[-2] + output = '@0@.@1@'.format(topic, section) + + custom_target( + output, + input: filename, + output: output, + command: [ + sh, '-c', '@0@ < @INPUT@ > @1@'.format(scdoc.path(), output) + ], + install: true, + install_dir: '@0@/man@1@'.format(mandir, section) + ) + endforeach +endif -- cgit v1.2.3