[pango/wip/meson: 3/3] meson: Add pango-view's man page generation



commit d5f8dc5d766ec79d996d9980299a797fa46a9d20
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri May 19 14:45:39 2017 +0100

    meson: Add pango-view's man page generation

 pango-view/meson.build |   34 ++++++++++++++++++++++++++--------
 1 files changed, 26 insertions(+), 8 deletions(-)
---
diff --git a/pango-view/meson.build b/pango-view/meson.build
index 12c2a43..b7aa634 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]