[gvfs] build: Use / instead of join_paths



commit ce13717c433c841f7b3e749ccedcdfc830c4f761
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Mon Dec 17 16:19:19 2018 +0100

    build: Use / instead of join_paths
    
    Since meson 0.49, the `/` character can be used to join paths[0], so
    all the instances of `join_paths` have been replaced.
    
    [0] http://mesonbuild.com/Release-notes-for-0-49-0.html#joining-paths-with-

 client/meson.build        |  6 +++---
 daemon/meson.build        |  8 ++++----
 man/meson.build           |  4 ++--
 meson.build               | 24 ++++++++++++------------
 metadata/meson.build      |  2 +-
 monitor/meson.build       |  6 +++---
 monitor/proxy/meson.build |  2 +-
 test/meson.build          |  4 ++--
 8 files changed, 28 insertions(+), 28 deletions(-)
---
diff --git a/client/meson.build b/client/meson.build
index b2d13597..72e80c10 100644
--- a/client/meson.build
+++ b/client/meson.build
@@ -5,7 +5,7 @@ headers = files(
 
 install_headers(
   headers,
-  subdir: join_paths('gvfs-client', 'gvfs'),
+  subdir: 'gvfs-client/gvfs',
 )
 
 # Dynamic client lib
@@ -40,10 +40,10 @@ deps = [
 cflags = [
   '-DG_LOG_DOMAIN="@0@"'.format(gvfs_name.to_upper()),
   '-DGVFS_LOCALEDIR="@0@"'.format(gvfs_localedir),
-  '-DGVFS_MODULE_DIR="@0@"'.format(join_paths(gvfs_libdir, 'gvfs', 'modules')),
+  '-DGVFS_MODULE_DIR="@0@"'.format(gvfs_pkglibdir / 'modules'),
 ]
 
-symbol_map = join_paths(meson.current_source_dir(), 'symbol.map')
+symbol_map = meson.current_source_dir() / 'symbol.map'
 
 ldflags = []
 if have_version_script
diff --git a/daemon/meson.build b/daemon/meson.build
index b835acf6..4f3155ef 100644
--- a/daemon/meson.build
+++ b/daemon/meson.build
@@ -21,7 +21,7 @@ endif
 
 dbus_service_conf = configuration_data()
 dbus_service_conf.set('service', dbus_service)
-dbus_service_conf.set('exec', join_paths(gvfs_libexecdir, dbus_exec))
+dbus_service_conf.set('exec', gvfs_libexecdir / dbus_exec)
 dbus_service_conf.set('systemd_service', dbus_systemd_service)
 
 daemon_service = configure_file(
@@ -396,12 +396,12 @@ if enable_admin
     output: policy,
     po_dir: po_dir,
     install: true,
-    install_dir: join_paths(gvfs_datadir, 'polkit-1', 'actions'),
+    install_dir: gvfs_datadir / 'polkit-1/actions',
   )
 
   install_data(
     gvfs_namespace + '.file-operations.rules',
-    install_dir: join_paths(gvfs_datadir, 'polkit-1', 'rules.d'),
+    install_dir: gvfs_datadir / 'polkit-1/rules.d',
   )
 endif
 
@@ -635,5 +635,5 @@ install_data(
 
 install_data(
   convert_data,
-  install_dir: join_paths(gvfs_datadir, 'GConf', 'gsettings'),
+  install_dir: gvfs_datadir / 'GConf/gsettings',
 )
diff --git a/man/meson.build b/man/meson.build
index bf4fcb11..063920a8 100644
--- a/man/meson.build
+++ b/man/meson.build
@@ -30,7 +30,7 @@ foreach man: mans
     output: output,
     command: xsltproc_cmd,
     install: true,
-    install_dir: join_paths(gvfs_mandir, 'man1'),
+    install_dir: gvfs_mandir / 'man1',
   )
 endforeach
 
@@ -43,5 +43,5 @@ custom_target(
   output: output,
   command: xsltproc_cmd,
   install: true,
-  install_dir: join_paths(gvfs_mandir, 'man7'),
+  install_dir: gvfs_mandir / 'man7',
 )
diff --git a/meson.build b/meson.build
index 03956566..e3aeeae9 100644
--- a/meson.build
+++ b/meson.build
@@ -10,21 +10,21 @@ gvfs_name = meson.project_name()
 gvfs_version = meson.project_version()
 
 gvfs_prefix = get_option('prefix')
-gvfs_datadir = join_paths(gvfs_prefix, get_option('datadir'))
-gvfs_libdir = join_paths(gvfs_prefix, get_option('libdir'))
-gvfs_libexecdir = join_paths(gvfs_prefix, get_option('libexecdir'))
-gvfs_localedir = join_paths(gvfs_prefix, get_option('localedir'))
-gvfs_mandir = join_paths(gvfs_prefix, get_option('mandir'))
+gvfs_datadir = gvfs_prefix / get_option('datadir')
+gvfs_libdir = gvfs_prefix / get_option('libdir')
+gvfs_libexecdir = gvfs_prefix / get_option('libexecdir')
+gvfs_localedir = gvfs_prefix / get_option('localedir')
+gvfs_mandir = gvfs_prefix / get_option('mandir')
 
-gvfs_pkgdatadir = join_paths(gvfs_datadir, gvfs_name)
-gvfs_pkglibdir = join_paths(gvfs_libdir, gvfs_name)
+gvfs_pkgdatadir = gvfs_datadir / gvfs_name
+gvfs_pkglibdir = gvfs_libdir / gvfs_name
 
 gvfs_rpath = gvfs_pkglibdir
 
-gvfs_remote_volume_monitors_dir = join_paths(gvfs_pkgdatadir, 'remote-volume-monitors')
+gvfs_remote_volume_monitors_dir = gvfs_pkgdatadir / 'remote-volume-monitors'
 
-gvfs_mountdir = join_paths(gvfs_pkgdatadir, 'mounts')
-gvfs_schema_dir = join_paths(gvfs_datadir, 'glib-2.0', 'schemas')
+gvfs_mountdir = gvfs_pkgdatadir / 'mounts'
+gvfs_schema_dir = gvfs_datadir / 'glib-2.0/schemas'
 
 gvfs_namespace = 'org.gtk.vfs'
 
@@ -218,7 +218,7 @@ endif
 add_project_arguments(common_flags, language: 'c')
 
 version_script_ldflag = '-Wl,--version-script'
-have_version_script = cc.has_link_argument('@0@,@1@'.format(version_script_ldflag, 
join_paths(meson.current_source_dir(), 'client', 'symbol.map')))
+have_version_script = cc.has_link_argument('@0@,@1@'.format(version_script_ldflag, 
meson.current_source_dir() / 'client/symbol.map'))
 
 gio_dep = dependency('gio-2.0')
 gio_unix_dep = dependency('gio-unix-2.0')
@@ -456,7 +456,7 @@ pkg = import('pkgconfig')
 service_conf = configuration_data()
 service_conf.set('libexecdir', gvfs_libexecdir)
 
-po_dir = join_paths(meson.source_root(), 'po')
+po_dir = meson.source_root() / 'po'
 
 top_inc = include_directories('.')
 
diff --git a/metadata/meson.build b/metadata/meson.build
index e02e7497..929d32fa 100644
--- a/metadata/meson.build
+++ b/metadata/meson.build
@@ -18,7 +18,7 @@ endif
 
 dbus_service_conf = configuration_data()
 dbus_service_conf.set('service', dbus_service)
-dbus_service_conf.set('exec', join_paths(gvfs_libexecdir, dbus_exec))
+dbus_service_conf.set('exec', gvfs_libexecdir / dbus_exec)
 dbus_service_conf.set('systemd_service', dbus_systemd_service)
 
 metadata_service = configure_file(
diff --git a/monitor/meson.build b/monitor/meson.build
index 15934e7f..05a080e7 100644
--- a/monitor/meson.build
+++ b/monitor/meson.build
@@ -35,7 +35,7 @@ foreach monitor: monitors
     service = dbus_exec + '.service'
 
     configure_file(
-      input: join_paths(monitor_name, service + '.in'),
+      input: monitor_name / service + '.in',
       output: service,
       install: true,
       install_dir: systemd_user_unit_dir,
@@ -45,7 +45,7 @@ foreach monitor: monitors
     dbus_systemd_service = 'SystemdService=' + service
   endif
 
-  monitor_data = files(join_paths(monitor_name, monitor_name + '.monitor'))
+  monitor_data = files(monitor_name / monitor_name + '.monitor')
 
   install_data(
     monitor_data,
@@ -54,7 +54,7 @@ foreach monitor: monitors
 
   dbus_service_conf = configuration_data()
   dbus_service_conf.set('service', dbus_service)
-  dbus_service_conf.set('exec', join_paths(gvfs_libexecdir, dbus_exec))
+  dbus_service_conf.set('exec', gvfs_libexecdir / dbus_exec)
   dbus_service_conf.set('systemd_service', dbus_systemd_service)
 
   monitor_service = configure_file(
diff --git a/monitor/proxy/meson.build b/monitor/proxy/meson.build
index fb285ebd..89119557 100644
--- a/monitor/proxy/meson.build
+++ b/monitor/proxy/meson.build
@@ -27,7 +27,7 @@ cflags = [
   '-DREMOTE_VOLUME_MONITORS_DIR="@0@"'.format(gvfs_remote_volume_monitors_dir),
 ]
 
-symbol_map = join_paths(meson.current_source_dir(), 'symbol.map')
+symbol_map = meson.current_source_dir() / 'symbol.map'
 
 ldflags = []
 if have_version_script
diff --git a/test/meson.build b/test/meson.build
index ee73859a..271b4a4d 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -1,6 +1,6 @@
 if enable_installed_tests
-  installed_tests_execdir = join_paths(gvfs_libexecdir, 'installed-tests', gvfs_name)
-  installed_tests_metadir = join_paths(gvfs_datadir, 'installed-tests', gvfs_name)
+  installed_tests_execdir = gvfs_libexecdir / 'installed-tests' / gvfs_name
+  installed_tests_metadir = gvfs_datadir / 'installed-tests' / gvfs_name
 
   tests_conf = configuration_data()
   tests_conf.set('testdir', installed_tests_execdir)


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