summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-05-19 14:45:39 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2017-05-19 17:32:28 +0100
commit018e60904c2fcf7f76f5c3908ed21007dbd9fd32 (patch)
treefc74bbad0c2fd2261c90ab281915d28e039c94e6
parent386939f9d576e8ac956f88fd85f87d1fba76e9ed (diff)
downloadpango-wip/meson.tar.gz
meson: Add pango-view's man page generationwip/meson
-rw-r--r--pango-view/meson.build34
1 files changed, 26 insertions, 8 deletions
diff --git a/pango-view/meson.build b/pango-view/meson.build
index 12c2a438..b7aa634b 100644
--- a/pango-view/meson.build
+++ b/pango-view/meson.build
@@ -30,11 +30,29 @@ if cairo_dep.found()
pango_view_deps += libpangocairo_dep
endif
-executable('pango-view', pango_view_sources,
- dependencies: pango_view_deps,
- include_directories: [ root_inc ],
- install: true,
- c_args: [
- '-DPACKAGE_NAME="@0@"'.format(meson.project_name()),
- '-DPACKAGE_VERSION="@0@"'.format(meson.project_version()),
- ])
+pango_view = executable('pango-view', pango_view_sources,
+ dependencies: pango_view_deps,
+ include_directories: [ root_inc ],
+ install: true,
+ c_args: [
+ '-DPACKAGE_NAME="@0@"'.format(meson.project_name()),
+ '-DPACKAGE_VERSION="@0@"'.format(meson.project_version()),
+ ])
+
+help2man = find_program('help2man', required: false)
+if help2man.found()
+ help2man_opts = [
+ '--no-info',
+ '--section=1',
+ '--help-option="--help-all"',
+ '--name="Pango text viewer"',
+ ]
+
+ custom_target('pango-view.1',
+ output: 'pango-view.1',
+ command: [
+ help2man, help2man_opts, '--output=@OUTPUT@', pango_view
+ ],
+ install: true,
+ install_dir: join_paths(pango_datadir, 'man/man1'))
+endif