[devhelp] build: simplify paths



commit de016a6cb8b08ec39a9b7455153641d1c139c6e4
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Apr 4 02:50:52 2020 +0200

    build: simplify paths
    
    - join_paths() is deprecated.
    - for install_dir keyword args, the get_option('prefix') is not
    required.

 data/icons/meson.build           | 12 ++----------
 data/meson.build                 | 14 +++++++-------
 devhelp/meson.build              | 10 +++-------
 meson.build                      |  2 +-
 plugins/gedit-plugin/meson.build |  2 +-
 5 files changed, 14 insertions(+), 26 deletions(-)
---
diff --git a/data/icons/meson.build b/data/icons/meson.build
index 4f11ef3f..34be13af 100644
--- a/data/icons/meson.build
+++ b/data/icons/meson.build
@@ -1,17 +1,9 @@
 install_data(
   'scalable/org.gnome.Devhelp.svg',
-  install_dir: join_paths(
-    get_option('prefix'),
-    get_option('datadir'),
-    'icons/hicolor/scalable/apps'
-  )
+  install_dir: get_option('datadir') / 'icons/hicolor/scalable/apps'
 )
 
 install_data(
   'symbolic/org.gnome.Devhelp-symbolic.svg',
-  install_dir: join_paths(
-    get_option('prefix'),
-    get_option('datadir'),
-    'icons/hicolor/symbolic/apps'
-  )
+  install_dir: get_option('datadir') / 'icons/hicolor/symbolic/apps'
 )
diff --git a/data/meson.build b/data/meson.build
index 2e48e8d5..e583f214 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -2,7 +2,7 @@ subdir('icons')
 
 install_data(
   'org.gnome.devhelp.gschema.xml',
-  install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'glib-2.0/schemas')
+  install_dir: get_option('datadir') / 'glib-2.0/schemas'
 )
 
 libdevhelp_gschema_conf = configuration_data()
@@ -12,7 +12,7 @@ configure_file(
   output: 'org.gnome.libdevhelp-@0  gschema xml'.format(LIBDEVHELP_API_VERSION),
   configuration: libdevhelp_gschema_conf,
   install: true,
-  install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'glib-2.0/schemas')
+  install_dir: get_option('datadir') / 'glib-2.0/schemas'
 )
 
 appdata = 'org.gnome.Devhelp.appdata.xml'
@@ -22,7 +22,7 @@ I18N.merge_file(
   output: appdata,
   po_dir: '../po/',
   install: true,
-  install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'metainfo')
+  install_dir: get_option('datadir') / 'metainfo'
 )
 
 desktop_file = 'org.gnome.Devhelp.desktop'
@@ -33,23 +33,23 @@ I18N.merge_file(
   output: desktop_file,
   po_dir: '../po/',
   install: true,
-  install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'applications')
+  install_dir: get_option('datadir') / 'applications'
 )
 
 service_file = 'org.gnome.Devhelp.service'
 service_conf = configuration_data()
-service_conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
+service_conf.set('bindir', get_option('prefix') / get_option('bindir'))
 configure_file(
   input: service_file + '.in',
   output: service_file,
   configuration: service_conf,
   install: true,
-  install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'dbus-1/services')
+  install_dir: get_option('datadir') / 'dbus-1/services'
 )
 
 install_data(
   ['assistant.css', 'assistant.js'],
-  install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'devhelp/assistant')
+  install_dir: get_option('datadir') / 'devhelp/assistant'
 )
 
 install_man('devhelp.1')
diff --git a/devhelp/meson.build b/devhelp/meson.build
index 7fc50cd9..fea31544 100644
--- a/devhelp/meson.build
+++ b/devhelp/meson.build
@@ -61,12 +61,8 @@ libdevhelp_private_c_files = [
 ]
 
 install_headers_first_subdir = 'devhelp-@0@'.format(LIBDEVHELP_API_VERSION)
-install_headers_subdir = join_paths(install_headers_first_subdir, 'devhelp')
-install_headers_fulldir = join_paths(
-  get_option('prefix'),
-  get_option('includedir'),
-  install_headers_subdir
-)
+install_headers_subdir = install_headers_first_subdir / 'devhelp'
+install_headers_fulldir = get_option('prefix') / get_option('includedir') / install_headers_subdir
 
 libdevhelp_enums = GNOME.mkenums_simple(
   'dh-enum-types',
@@ -93,7 +89,7 @@ STATIC_LIBDEVHELP_DECLARED_DEP = declare_dependency(
   dependencies: LIBDEVHELP_DEPS
 )
 
-symbol_map = join_paths(meson.current_source_dir(), 'symbol.map')
+symbol_map = meson.current_source_dir() / 'symbol.map'
 
 libdevhelp = shared_library(
   'devhelp-@0@'.format(LIBDEVHELP_API_VERSION),
diff --git a/meson.build b/meson.build
index 9833b4d3..10d917f5 100644
--- a/meson.build
+++ b/meson.build
@@ -160,7 +160,7 @@ endif
 
 meson.add_install_script(
   'meson_post_install.py',
-  join_paths(get_option('prefix'), get_option('datadir'))
+  get_option('prefix') / get_option('datadir')
 )
 
 summary('Prefix', get_option('prefix'))
diff --git a/plugins/gedit-plugin/meson.build b/plugins/gedit-plugin/meson.build
index 9e4b5032..4f779886 100644
--- a/plugins/gedit-plugin/meson.build
+++ b/plugins/gedit-plugin/meson.build
@@ -1,4 +1,4 @@
-gedit_plugin_dir = join_paths(get_option('prefix'), get_option('libdir'), 'gedit/plugins')
+gedit_plugin_dir = get_option('libdir') / 'gedit/plugins'
 
 install_data(
   'devhelp.py',


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