From: Emil Velikov Date: Thu, 24 Oct 2024 22:00:03 +0000 (+0100) Subject: meson: switch to / operator instead of join_paths() X-Git-Tag: v34~171 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d409560e519dddcefa937f71c41cd99cb1eb017;p=thirdparty%2Fkmod.git meson: switch to / operator instead of join_paths() The former was introduced with meson v0.49. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/209 Signed-off-by: Lucas De Marchi --- diff --git a/man/meson.build b/man/meson.build index f2c2c8d2..0b217113 100644 --- a/man/meson.build +++ b/man/meson.build @@ -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 diff --git a/meson.build b/meson.build index dc855265..ab0bc56c 100644 --- a/meson.build +++ b/meson.build @@ -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 diff --git a/testsuite/meson.build b/testsuite/meson.build index a9ea5133..ca22026f 100644 --- a/testsuite/meson.build +++ b/testsuite/meson.build @@ -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, ],