[dconf/wip/inigomartinez/meson: 1/14] build: Rename build options



commit 6b874474776c7ca22dd8bf34992fbf56b2a94253
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Sun Nov 12 11:30:48 2017 +0100

    build: 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.
    - Remove the with prefix from string options.
    - The character separator from multi-word options has been changed
      to underscore.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=790236

 docs/meson.build    |    4 ++--
 meson.build         |    4 ++--
 meson_options.txt   |   10 +++++-----
 service/meson.build |    4 ++--
 4 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/docs/meson.build b/docs/meson.build
index d74eedf..65ca23d 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -12,9 +12,9 @@ gnome.gtkdoc(
   install_dir: join_paths(dconf_datadir, 'gtk-doc', 'html', meson.project_name())
 )
 
-if get_option('enable-man')
+if get_option('man')
   xsltproc = find_program('xsltproc', required: false)
-  assert(xsltproc.found(), 'xsltproc is required for enable-man')
+  assert(xsltproc.found(), 'xsltproc is required for man generation')
 
   xsltproc_cmd = [
     xsltproc,
diff --git a/meson.build b/meson.build
index cddf083..19dbe82 100644
--- a/meson.build
+++ b/meson.build
@@ -78,7 +78,7 @@ gio_unix_dep = dependency('gio-unix-2.0', version: gio_unix_req_version)
 
 gio_querymodules = find_program('gio-querymodules', required: false)
 if gio_querymodules.found()
-  gio_modules_dir = get_option('with-gio-modules-dir').strip()
+  gio_modules_dir = get_option('gio_modules_dir')
   if gio_modules_dir == ''
     gio_modules_dir = join_paths(dconf_libdir, 'gio', 'modules')
   endif
@@ -106,7 +106,7 @@ subdir('gsettings')
 subdir('client')
 subdir('bin')
 
-if get_option('enable-gtk-doc')
+if get_option('gtk_doc')
   subdir('docs')
 endif
 
diff --git a/meson_options.txt b/meson_options.txt
index fb01218..4599ada 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,5 +1,5 @@
-option('enable-man', type: 'boolean', value: true, description: 'generate man pages')
-option('with-gio-modules-dir', type: 'string', value: '', description: 'choose directory for the GIO module 
[default=LIBDIR/gio/modules]')
-option('with-dbus-service-dir', type: 'string', value: '', description: 'choose directory for dbus service 
files [default=PREFIX/share/dbus-1/services]')
-option('with-dbus-system-service-dir', type: 'string', value: '', description: 'choose directory for dbus 
system service files [default=PREFIX/share/dbus-1/system-services]')
-option('enable-gtk-doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation')
+option('man', type: 'boolean', value: true, description: 'generate man pages')
+option('gio_modules_dir', type: 'string', value: '', description: 'choose directory for the GIO module 
[default=LIBDIR/gio/modules]')
+option('dbus_service_dir', type: 'string', value: '', description: 'choose directory for dbus service files 
[default=PREFIX/share/dbus-1/services]')
+option('dbus_system_service_dir', type: 'string', value: '', description: 'choose directory for dbus system 
service files [default=PREFIX/share/dbus-1/system-services]')
+option('gtk_doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation')
diff --git a/service/meson.build b/service/meson.build
index f651e25..800dd87 100644
--- a/service/meson.build
+++ b/service/meson.build
@@ -1,9 +1,9 @@
-dbus_service_dir = get_option('with-dbus-service-dir').strip()
+dbus_service_dir = get_option('dbus_service_dir')
 if dbus_service_dir == ''
   dbus_service_dir = join_paths(dconf_datadir, 'dbus-1', 'services')
 endif
 
-dbus_system_service_dir = get_option('with-dbus-system-service-dir').strip()
+dbus_system_service_dir = get_option('dbus_system_service_dir')
 if dbus_system_service_dir == ''
   dbus_system_service_dir = join_paths(dconf_datadir, 'dbus-1', 'system-services')
 endif


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