diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2017-08-07 11:49:52 +0200 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2017-08-18 10:58:47 +0200 |
commit | 48cf30d3e2fe95426f8fd1046f381ea299ba83d9 (patch) | |
tree | 180f6c67d6514bb27e6e75655e35e69490065d41 /meson.build | |
parent | 1f20b5dff52343afbe229e043128d3e7ed96d627 (diff) | |
download | sshfs-48cf30d3e2fe95426f8fd1046f381ea299ba83d9.tar sshfs-48cf30d3e2fe95426f8fd1046f381ea299ba83d9.tar.gz sshfs-48cf30d3e2fe95426f8fd1046f381ea299ba83d9.tar.bz2 sshfs-48cf30d3e2fe95426f8fd1046f381ea299ba83d9.zip |
Converted manpage to Restructured Text
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/meson.build b/meson.build index 1aff672..315f330 100644 --- a/meson.build +++ b/meson.build @@ -25,6 +25,8 @@ if not cc.compiles(code, args: [ '-O0', '-Werror=unused-result' ]) endif +rst2man = find_program('rst2man', required: false) + cfg = configuration_data() cfg.set_quoted('PACKAGE_VERSION', meson.project_version()) @@ -39,9 +41,6 @@ else cfg.set_quoted('IDMAP_DEFAULT', 'none') endif -configure_file(input: 'sshfs.1.in', - output: 'sshfs.1', - configuration : cfg) configure_file(output: 'config.h', configuration : cfg) @@ -56,9 +55,14 @@ executable('sshfs', sshfs_sources, install: true, install_dir: get_option('bindir')) -# This is a little ugly. Is there a better way to tell Meson that the -# manpage is in the build directory? -install_man(join_paths(meson.current_build_dir(), 'sshfs.1')) +if rst2man.found() + custom_target('manpages', input: [ 'sshfs.rst' ], output: [ 'sshfs.1' ], + command: [rst2man, '@INPUT@', '@OUTPUT@'], install: true, + install_dir: join_paths(get_option('mandir'), '1')) +else + message('rst2man not found, not building manual page.') +endif + subdir('test') |