diff options
| author | Drew DeVault <sir@cmpwn.com> | 2019-01-13 21:24:33 -0500 |
|---|---|---|
| committer | Drew DeVault <sir@cmpwn.com> | 2019-01-13 21:24:33 -0500 |
| commit | 4f44a3b2bd3d09b0875589422293aeb0651343dd (patch) | |
| tree | 75c6cf2af0d146fec3fb957aee8fe246074c1449 /meson.build | |
| parent | e1971223818e9f677ccf4115159b0f2eb14f572f (diff) | |
Add README.md, compile man pages
Diffstat (limited to 'meson.build')
| -rw-r--r-- | meson.build | 24 |
1 files changed, 24 insertions, 0 deletions
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 |
