summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gmail.com>2017-05-10 14:32:59 +0100
committerGitHub <noreply@github.com>2017-05-10 14:32:59 +0100
commit4de7a815b96642cde913dbb87fe0b2644a4ad2e7 (patch)
tree48ca9b9663cae55df27646433f0ff1a5579d913d
parent2d120f4bbd8caa82994658ab0689600cd6386d05 (diff)
parentb6afe98e4cde3fa14a7a33c6edf6a97e05a0ae4c (diff)
downloadappstream-glib-4de7a815b96642cde913dbb87fe0b2644a4ad2e7.tar.gz
Merge pull request #167 from ebassi/conditional-docs
Conditionally generate docs
-rw-r--r--data/meson.build2
-rw-r--r--docs/meson.build4
-rw-r--r--meson_options.txt2
3 files changed, 6 insertions, 2 deletions
diff --git a/data/meson.build b/data/meson.build
index 5107f8e..81efa94 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -12,7 +12,7 @@ install_data('appdata.its', install_dir : 'share/gettext/its')
install_data('appdata.loc', install_dir : 'share/gettext/its')
xsltproc = find_program('xsltproc', required : false)
-if xsltproc.found()
+if get_option('enable-man') and xsltproc.found()
custom_target('appstream-util-man',
input: 'appstream-util.xml',
output: 'appstream-util.1',
diff --git a/docs/meson.build b/docs/meson.build
index dc2bb41..7827d92 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -1 +1,3 @@
-subdir('api')
+if get_option('enable-gtk-doc')
+ subdir('api')
+endif
diff --git a/meson_options.txt b/meson_options.txt
index 5289be5..e8c7f55 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,3 +4,5 @@ option('enable-rpm', type : 'boolean', value : true, description : 'enable RPM s
option('enable-alpm', type : 'boolean', value : false, description : 'enable ALPM support')
option('enable-fonts', type : 'boolean', value : true, description : 'enable font support')
option('enable-stemmer', type : 'boolean', value : true, description : 'enable stemmer support')
+option('enable-man', type : 'boolean', value : true, description : 'generate man pages')
+option('enable-gtk-doc', type : 'boolean', value : false, description : 'generate API reference')