]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
meson: switch to / operator instead of join_paths()
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 24 Oct 2024 22:00:03 +0000 (23:00 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Thu, 24 Oct 2024 22:46:25 +0000 (17:46 -0500)
The former was introduced with meson v0.49.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/209
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
man/meson.build
meson.build
testsuite/meson.build

index f2c2c8d222a3cbfe7dc86636ada5ba6fc40b9824..0b217113867438b14989e3c5428f8bc1d5f4e00e 100644 (file)
@@ -31,7 +31,7 @@ foreach tuple : _man_pages
     capture : true,
     build_by_default : get_option('manpages'),
     install : true,
-    install_dir : join_paths(get_option('mandir'), 'man@0@'.format(section))
+    install_dir : get_option('mandir') / 'man@0@'.format(section)
   )
 endforeach
 
@@ -51,6 +51,6 @@ foreach tuple : _man_aliases
     capture : true,
     build_by_default : get_option('manpages'),
     install : true,
-    install_dir : join_paths(get_option('mandir'), 'man@0@'.format(section))
+    install_dir : get_option('mandir') / 'man@0@'.format(section)
   )
 endforeach
index dc855265fcb7aa159dd2f29922ba28939e3bffe9..ab0bc56c16eae1a1e290a488f8c9ab7c34bc5e89 100644 (file)
@@ -186,9 +186,9 @@ features = []
 sysconfdir = get_option('sysconfdir')
 cdata.set_quoted('SYSCONFDIR', sysconfdir)
 
-bindir = join_paths(get_option('prefix'), get_option('bindir'))
-includedir = join_paths(get_option('prefix'), get_option('includedir'))
-libdir = join_paths(get_option('prefix'), get_option('libdir'))
+bindir = get_option('prefix') / get_option('bindir')
+includedir = get_option('prefix') / get_option('includedir')
+libdir = get_option('prefix') / get_option('libdir')
 
 distconfdir = get_option('distconfdir')
 if distconfdir == ''
@@ -221,8 +221,7 @@ foreach tuple : _completiondirs
     if completion.found()
       completiondir = completion.get_variable(pkgconfig : 'completionsdir')
     else
-      completiondir = join_paths(get_option('prefix'), get_option('datadir'),
-                                 def_path)
+      completiondir = get_option('prefix') / get_option('datadir') / def_path
     endif
   endif
 
@@ -367,8 +366,8 @@ libkmod = shared_library(
   libkmod_files,
   dependencies : libkmod_deps,
   link_with : libshared,
-  link_args : ['-Wl,--version-script', join_paths(meson.current_source_dir(),
-                                                  'libkmod/libkmod.sym')],
+  link_args : ['-Wl,--version-script', meson.current_source_dir() /
+                                                  'libkmod/libkmod.sym'],
   link_depends : files('libkmod/libkmod.sym'),
   gnu_symbol_visibility : 'hidden',
   version : '2.5.0',
@@ -430,7 +429,7 @@ endif
 pkg.generate(
   name : 'kmod',
   description : 'Tools to deal with kernel modules',
-  install_dir : join_paths(get_option('datadir'), 'pkgconfig'),
+  install_dir : get_option('datadir') / 'pkgconfig',
   variables : _kmod_variables,
 )
 
@@ -446,7 +445,7 @@ _tools = [
 kmod_symlink = find_program('scripts/kmod-symlink.sh')
 foreach tool : _tools
   if get_option('tools')
-    symlink = join_paths(bindir, tool)
+    symlink = bindir / tool
     meson.add_install_script(kmod_symlink, symlink)
   endif
 endforeach
index a9ea513395586f6d4a2274206fbe295b0a1f4f77..ca22026fa7da2f904bb256a25c0234c10303856a 100644 (file)
@@ -22,10 +22,10 @@ create_rootfs = custom_target(
   'create-rootfs',
   command : [
     setup_rootfs,
-    join_paths(meson.project_source_root(), 'testsuite/rootfs-pristine'),
-    join_paths(meson.project_build_root(), 'testsuite/rootfs'),
-    join_paths(meson.project_build_root(), 'testsuite/module-playground'),
-    join_paths(meson.project_build_root(), 'config.h'),
+    meson.project_source_root() / 'testsuite/rootfs-pristine',
+    meson.project_build_root() / 'testsuite/rootfs',
+    meson.project_build_root() / 'testsuite/module-playground',
+    meson.project_build_root() / 'config.h',
     sysconfdir,
     moduledir,
   ],