[gnome-todo: 1/2] project: Rename build options
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo: 1/2] project: Rename build options
- Date: Thu, 18 Jan 2018 21:03:55 +0000 (UTC)
commit 3dd0680008e0ecd1587afafeca1e8220fb3bc737
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Sat Nov 11 20:52:59 2017 +0100
project: Rename build options
Following the new meson porting guidelines, this patch renames the
build options. The list of changes is as follows:
- Remove the enable prefix from boolean options.
- The character separator from multi-word options has been changed
to underscore.
configure | 2 +-
meson.build | 18 +++++++++---------
meson_options.txt | 20 ++++++++++----------
plugins/meson.build | 16 ++++++++--------
src/meson.build | 2 +-
5 files changed, 29 insertions(+), 29 deletions(-)
---
diff --git a/configure b/configure
index 6ee3185..fc9b359 100755
--- a/configure
+++ b/configure
@@ -159,7 +159,7 @@ END
cmd_options=""
for key in "${!meson_options[@]}"; do
- cmd_options="$cmd_options -Denable-$key=${meson_options[$key]}"
+ cmd_options="$cmd_options -D${key/\-/_}=${meson_options[$key]}"
done
exec ${MESON} \
diff --git a/meson.build b/meson.build
index a56a8c5..0f16355 100644
--- a/meson.build
+++ b/meson.build
@@ -179,7 +179,7 @@ subdir('src')
subdir('data')
subdir('po')
-enable_gtk_doc = get_option('enable-gtk-doc')
+enable_gtk_doc = get_option('gtk_doc')
if enable_gtk_doc
subdir('doc/reference')
endif
@@ -194,13 +194,13 @@ output += ' global flags: ' + ' '.join(compiler_flags) + ' '.join(get_op
output += ' release: ' + (not gnome_todo_debug).to_string() + '\n'
output += ' documentation: ' + enable_gtk_doc.to_string() + '\n'
output += ' Plugins:\n\n'
-output += ' Dark theme .............. ' + get_option('enable-dark-theme-plugin').to_string() + '\n'
-output += ' Run in Background ....... ' + get_option('enable-background-plugin').to_string() + '\n'
-output += ' Scheduled panel ......... ' + get_option('enable-scheduled-panel-plugin').to_string() +
'\n'
-output += ' Score ................... ' + get_option('enable-score-plugin').to_string() + '\n'
-output += ' Today panel ............. ' + get_option('enable-today-panel-plugin').to_string() + '\n'
-output += ' Unscheduled panel ....... ' + get_option('enable-unscheduled-panel-plugin').to_string() +
'\n'
-output += ' Todo.txt ................ ' + get_option('enable-todo-txt-plugin').to_string() + '\n'
-output += ' Todoist ................. ' + get_option('enable-todoist-plugin').to_string() + '\n'
+output += ' Dark theme .............. ' + get_option('dark_theme_plugin').to_string() + '\n'
+output += ' Run in Background ....... ' + get_option('background_plugin').to_string() + '\n'
+output += ' Scheduled panel ......... ' + get_option('scheduled_panel_plugin').to_string() + '\n'
+output += ' Score ................... ' + get_option('score_plugin').to_string() + '\n'
+output += ' Today panel ............. ' + get_option('today_panel_plugin').to_string() + '\n'
+output += ' Unscheduled panel ....... ' + get_option('unscheduled_panel_plugin').to_string() + '\n'
+output += ' Todo.txt ................ ' + get_option('todo_txt_plugin').to_string() + '\n'
+output += ' Todoist ................. ' + get_option('todoist_plugin').to_string() + '\n'
output += ' Now type \'ninja -C ' + meson.build_root() + '\' to build ' + meson.project_name()
message(output)
diff --git a/meson_options.txt b/meson_options.txt
index 8228856..359d0b5 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,10 +1,10 @@
-option('enable-background-plugin', type: 'boolean', value: true, description: 'enable Run In Background
plugin')
-option('enable-dark-theme-plugin', type: 'boolean', value: true, description: 'enable Dark theme plugin')
-option('enable-scheduled-panel-plugin', type: 'boolean', value: true, description: 'enable Scheduled Panel
plugin')
-option('enable-score-plugin', type: 'boolean', value: true, description: 'enable Score plugin')
-option('enable-today-panel-plugin', type: 'boolean', value: true, description: 'enable Today Panel plugin')
-option('enable-unscheduled-panel-plugin', type: 'boolean', value: true, description: 'enable Unscheduled
Tasks Panel plugin')
-option('enable-todo-txt-plugin', type: 'boolean', value: true, description: 'enable Todo.Txt plugin')
-option('enable-todoist-plugin', type: 'boolean', value: true, description: 'enable Todoist plugin')
-option('enable-gtk-doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation')
-option('enable-introspection', type: 'boolean', value: true, description: 'Enable GObject Introspection
(depends on GObject)')
+option('background_plugin', type: 'boolean', value: true, description: 'enable Run In Background plugin')
+option('dark_theme_plugin', type: 'boolean', value: true, description: 'enable Dark theme plugin')
+option('scheduled_panel_plugin', type: 'boolean', value: true, description: 'enable Scheduled Panel plugin')
+option('score_plugin', type: 'boolean', value: true, description: 'enable Score plugin')
+option('today_panel_plugin', type: 'boolean', value: true, description: 'enable Today Panel plugin')
+option('unscheduled_panel_plugin', type: 'boolean', value: true, description: 'enable Unscheduled Tasks
Panel plugin')
+option('todo_txt_plugin', type: 'boolean', value: true, description: 'enable Todo.Txt plugin')
+option('todoist_plugin', type: 'boolean', value: true, description: 'enable Todoist plugin')
+option('gtk_doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation')
+option('introspection', type: 'boolean', value: true, description: 'Enable GObject Introspection (depends on
GObject)')
diff --git a/plugins/meson.build b/plugins/meson.build
index 3c45f8f..820a792 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -9,34 +9,34 @@ plugins_conf.set('VERSION', gnome_todo_version)
subdir('eds')
-if get_option('enable-background-plugin')
+if get_option('background_plugin')
subdir('background')
endif
-if get_option('enable-dark-theme-plugin')
+if get_option('dark_theme_plugin')
subdir('dark-theme')
endif
-if get_option('enable-scheduled-panel-plugin')
+if get_option('scheduled_panel_plugin')
subdir('scheduled-panel')
endif
-if get_option('enable-score-plugin')
+if get_option('score_plugin')
subdir('score')
endif
-if get_option('enable-today-panel-plugin')
+if get_option('today_panel_plugin')
subdir('today-panel')
endif
-if get_option('enable-unscheduled-panel-plugin')
+if get_option('unscheduled_panel_plugin')
subdir('unscheduled-panel')
endif
-if get_option('enable-todo-txt-plugin')
+if get_option('todo_txt_plugin')
subdir('todo-txt')
endif
-if get_option('enable-todoist-plugin')
+if get_option('todoist_plugin')
subdir('todoist')
endif
diff --git a/src/meson.build b/src/meson.build
index 53c772e..dee0792 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -183,7 +183,7 @@ pkg.generate(
# GObject-Introspection #
#########################
-if get_option('enable-introspection')
+if get_option('introspection')
gir_sources = files(
'engine/gtd-manager.c',
'engine/gtd-manager.h',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]