[calls] meson: Build manpage with rst2man
- From: Evangelos Ribeiro Tzaras <devrtz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [calls] meson: Build manpage with rst2man
- Date: Wed, 8 Jun 2022 08:50:13 +0000 (UTC)
commit 6738962073008e2067e11be3082c19048d46a0cb
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date: Tue May 31 20:03:49 2022 +0200
meson: Build manpage with rst2man
Closes #457
doc/meson.build | 16 ++++++++++++++++
meson_options.txt | 4 ++++
2 files changed, 20 insertions(+)
---
diff --git a/doc/meson.build b/doc/meson.build
index d7d728a6..39d6e8f5 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -44,3 +44,19 @@ gnome.gtkdoc('calls',
install: true)
endif
+
+rst2man = find_program('rst2man', 'rst2man.py', required: false)
+if get_option('manpages') and not rst2man.found()
+ error('No rst2man found, but man pages were explicitly enabled')
+endif
+
+if get_option('manpages') and rst2man.found()
+ custom_target('man-gnome-calls',
+ input: 'gnome-calls.rst',
+ output: 'gnome-calls.1',
+ command: [rst2man, '@INPUT@'],
+ capture: true,
+ install: true,
+ install_dir: get_option('mandir') / 'man1',
+ )
+endif
diff --git a/meson_options.txt b/meson_options.txt
index 41f2046e..141ed300 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -5,3 +5,7 @@ option('gtk_doc',
option('tests',
type: 'boolean', value: true,
description: 'Whether to compile unit tests')
+
+option('manpages',
+ type: 'boolean', value: true,
+ description: 'Whether to generate man pages')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]