[devhelp] build: add plugin_emacs, plugin_gedit and plugin_vim options
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] build: add plugin_emacs, plugin_gedit and plugin_vim options
- Date: Sun, 10 Jan 2021 16:15:44 +0000 (UTC)
commit 453977cf0a91cc91ba3bce5373f60877c973f8c3
Author: Sébastien Wilmet <sw swilmet be>
Date: Sun Jan 10 17:00:39 2021 +0100
build: add plugin_emacs, plugin_gedit and plugin_vim options
It's often desirable to build a minimal version of Devhelp. Instead of
removing files afterwards, it's better to not install them in the first
place.
meson.build | 3 +++
meson_options.txt | 18 ++++++++++++++++++
plugins/meson.build | 24 +++++++++++++++---------
3 files changed, 36 insertions(+), 9 deletions(-)
---
diff --git a/meson.build b/meson.build
index 688f3d6a..3c91a071 100644
--- a/meson.build
+++ b/meson.build
@@ -166,3 +166,6 @@ meson.add_install_script(
summary('Prefix', get_option('prefix'))
summary('API documentation', get_option('gtk_doc'))
summary('Flatpak build mode', get_option('flatpak_build'))
+summary('Plugin for Emacs', get_option('plugin_emacs'))
+summary('Plugin for gedit', get_option('plugin_gedit'))
+summary('Plugin for Vim', get_option('plugin_vim'))
diff --git a/meson_options.txt b/meson_options.txt
index ba707601..cf35f960 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -9,3 +9,21 @@ option(
type: 'boolean', value: false,
description: 'Build the API reference'
)
+
+option(
+ 'plugin_emacs',
+ type: 'boolean', value: false,
+ description: 'Install the Emacs plugin'
+)
+
+option(
+ 'plugin_gedit',
+ type: 'boolean', value: false,
+ description: 'Install the gedit plugin'
+)
+
+option(
+ 'plugin_vim',
+ type: 'boolean', value: false,
+ description: 'Install the Vim plugin'
+)
diff --git a/plugins/meson.build b/plugins/meson.build
index f19dd9f2..9e6faaf9 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -1,11 +1,17 @@
-subdir('gedit-plugin')
+if get_option('plugin_gedit')
+ subdir('gedit-plugin')
+endif
-install_data(
- 'devhelp.el',
- install_dir: get_option('datadir') / 'emacs/site-lisp'
-)
+if get_option('plugin_emacs')
+ install_data(
+ 'devhelp.el',
+ install_dir: get_option('datadir') / 'emacs/site-lisp'
+ )
+endif
-install_data(
- 'devhelp.vim',
- install_dir: get_option('datadir') / 'vim/vimfiles/plugin'
-)
+if get_option('plugin_vim')
+ install_data(
+ 'devhelp.vim',
+ install_dir: get_option('datadir') / 'vim/vimfiles/plugin'
+ )
+endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]