[gtk+/wip/meson: 108/136] build: Use the appropriate quoting



commit 9b817d38358ce52da29e0d887cb396cde006999b
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Apr 18 14:21:05 2017 +0100

    build: Use the appropriate quoting
    
    There's no need for string concatenation.

 gtk/meson.build |    3 +--
 meson.build     |   15 ++++++++++-----
 2 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/gtk/meson.build b/gtk/meson.build
index 6524de2..14c181b 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -765,8 +765,7 @@ gtk_cargs = [
   '-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
   '-DGTK_BINARY_VERSION="' + gtk_binary_version + '"',
   '-DGTK_HOST="' + host_machine.system() + '"',
-  '-DGTK_SYSCONFDIR="' + get_option('prefix') + '/etc"',
-  '-DGTK_DATADIR="' + get_option('datadir') + '"',
+  '-DGTK_SYSCONFDIR="' + get_option('sysconfdir') + '"',
   '-DGTK_DATA_PREFIX="'+ get_option('prefix') + '"',
 ]
 
diff --git a/meson.build b/meson.build
index 5a46c8b..9633d02 100644
--- a/meson.build
+++ b/meson.build
@@ -77,14 +77,19 @@ endif
 
 os_unix = not os_win32
 
+gtk_prefix = get_option('prefix')
+gtk_libdir = join_paths(gtk_prefix, get_option('libdir'))
+gtk_datadir = join_paths(gtk_prefix, get_option('datadir'))
+gtk_localedir = join_paths(gtk_prefix, get_option('localedir'))
 
 cc = meson.get_compiler('c')
+
 cdata = configuration_data()
-cdata.set('PACKAGE_VERSION', '"'+meson.project_version()+'"')
-cdata.set('GTK_LOCALEDIR', '"'+get_option('localedir')+'"')
-cdata.set('GTK_DATADIR', '"'+get_option('datadir')+'"')
-cdata.set('GTK_LIBDIR', '"'+get_option('libdir')+'"')
-cdata.set('GETTEXT_PACKAGE', '"gtk40"')
+cdata.set_quoted('PACKAGE_VERSION', meson.project_version())
+cdata.set_quoted('GTK_LOCALEDIR', gtk_localedir)
+cdata.set_quoted('GTK_DATADIR', gtk_datadir)
+cdata.set_quoted('GTK_LIBDIR', gtk_libdir)
+cdata.set_quoted('GETTEXT_PACKAGE', 'gtk40')
 cdata.set('GTK_MAJOR_VERSION', gtk_major_version)
 cdata.set('GTK_MINOR_VERSION', gtk_minor_version)
 cdata.set('GTK_MICRO_VERSION', gtk_micro_version)


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