summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2021-09-09 23:23:38 +0200
committerIñigo Martínez <inigomartinez@gmail.com>2021-09-13 11:05:44 +0200
commit7fe355d4bfc36ba947843080f4e212349153c9fd (patch)
treefc4c7c474acd8e8f4e9ee89274bee80c75312bee
parentba4c55e09eb9901acf1169c0238ae1bfafdb8e98 (diff)
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-
-rw-r--r--docs/man/meson.build2
-rw-r--r--docs/reference/libqmi-glib/meson.build6
-rw-r--r--meson.build10
-rw-r--r--src/libqmi-glib/generated/meson.build32
-rw-r--r--src/libqmi-glib/meson.build2
-rw-r--r--src/qmi-firmware-update/meson.build4
-rw-r--r--src/qmi-proxy/meson.build2
7 files changed, 29 insertions, 29 deletions
diff --git a/docs/man/meson.build b/docs/man/meson.build
index c584408..9139142 100644
--- a/docs/man/meson.build
+++ b/docs/man/meson.build
@@ -16,6 +16,6 @@ foreach man: mans
output: man[0] + '.1',
command: man[1],
install: true,
- install_dir: join_paths(qmi_mandir, 'man1'),
+ install_dir: qmi_mandir / 'man1',
)
endforeach
diff --git a/docs/reference/libqmi-glib/meson.build b/docs/reference/libqmi-glib/meson.build
index ea97e77..7943ade 100644
--- a/docs/reference/libqmi-glib/meson.build
+++ b/docs/reference/libqmi-glib/meson.build
@@ -35,9 +35,9 @@ scan_args = [
glib_prefix = glib_dep.get_pkgconfig_variable('prefix')
fixxref_args = [
- '--html-dir=' + join_paths(qmi_prefix, gnome.gtkdoc_html_dir(doc_module)),
- '--extra-dir=' + join_paths(glib_prefix, gnome.gtkdoc_html_dir('glib')),
- '--extra-dir=' + join_paths(glib_prefix, gnome.gtkdoc_html_dir('gio')),
+ '--html-dir=' + (qmi_prefix / gnome.gtkdoc_html_dir(doc_module)),
+ '--extra-dir=' + (glib_prefix / gnome.gtkdoc_html_dir('glib')),
+ '--extra-dir=' + (glib_prefix / gnome.gtkdoc_html_dir('gio')),
]
name = doc_module + '-sections.txt'
diff --git a/meson.build b/meson.build
index 28791fd..4db4500 100644
--- a/meson.build
+++ b/meson.build
@@ -27,7 +27,7 @@ qmi_libexecdir = get_option('libexecdir')
qmi_mandir = get_option('mandir')
qmi_glib_include_subdir = meson.project_name() + '-glib'
-qmi_glib_pkgincludedir = join_paths(qmi_includedir, qmi_glib_include_subdir)
+qmi_glib_pkgincludedir = qmi_includedir / qmi_glib_include_subdir
# libtool versioning for libqmi-glib (-version-info c:r:a)
# - If the interface is unchanged, but the implementation has changed or been fixed, then increment r
@@ -48,11 +48,11 @@ python = import('python').find_installation('python3')
source_root = meson.current_source_dir()
-data_dir = join_paths(source_root, 'data')
-templates_dir = join_paths(source_root, 'build-aux/templates')
+data_dir = source_root / 'data'
+templates_dir = source_root / 'build-aux/templates'
-qmi_codegen = find_program(join_paths(source_root, 'build-aux/qmi-codegen/qmi-codegen'))
-qmi_mkenums = find_program(join_paths(source_root, 'build-aux/qmi-mkenums'))
+qmi_codegen = find_program(source_root / 'build-aux/qmi-codegen/qmi-codegen')
+qmi_mkenums = find_program(source_root / 'build-aux/qmi-mkenums')
top_inc = include_directories('.')
diff --git a/src/libqmi-glib/generated/meson.build b/src/libqmi-glib/generated/meson.build
index 3b74c38..900bc40 100644
--- a/src/libqmi-glib/generated/meson.build
+++ b/src/libqmi-glib/generated/meson.build
@@ -19,7 +19,7 @@ gen_headers += custom_target(
python,
qmi_mkenums,
'--fhead', '#ifndef __LIBQMI_GLIB_ERROR_TYPES_H__\n#define __LIBQMI_GLIB_ERROR_TYPES_H__\n#include "qmi-errors.h"\n',
- '--template', files(join_paths(templates_dir, enum_types + '.h.template')),
+ '--template', files(templates_dir / enum_types + '.h.template'),
'--ftail', '#endif /* __LIBQMI_GLIB_ERROR_TYPES_H__ */\n',
'@INPUT@'],
capture: true,
@@ -35,7 +35,7 @@ gen_sources += custom_target(
python,
qmi_mkenums,
'--fhead', '#include "qmi-errors.h"\n#include "qmi-error-types.h"\n',
- '--template', files(join_paths(templates_dir, enum_types + '.c.template')),
+ '--template', files(templates_dir / enum_types + '.c.template'),
'@INPUT@'],
capture: true,
)
@@ -50,7 +50,7 @@ gen_sources += custom_target(
python,
qmi_mkenums,
'--fhead', '#include "qmi-errors.h"\n#include "qmi-error-types.h"\n',
- '--template', files(join_paths(templates_dir, enum_types + '.c.template')),
+ '--template', files(templates_dir / enum_types + '.c.template'),
'@INPUT@'],
capture: true,
)
@@ -66,7 +66,7 @@ gen_headers += custom_target(
python,
qmi_mkenums,
'--fhead', '#ifndef __LIBQMI_GLIB_ENUM_TYPES_H__\n#define __LIBQMI_GLIB_ENUM_TYPES_H__\n#include "qmi-enums.h"\n#include "qmi-enums-wds.h"\n#include "qmi-enums-dms.h"\n#include "qmi-enums-nas.h"\n#include "qmi-enums-wms.h"\n#include "qmi-enums-pds.h"\n#include "qmi-enums-pdc.h"\n#include "qmi-enums-pbm.h"\n#include "qmi-enums-uim.h"\n#include "qmi-enums-sar.h"\n#include "qmi-enums-oma.h"\n#include "qmi-enums-wda.h"\n#include "qmi-enums-voice.h"\n#include "qmi-enums-loc.h"\n#include "qmi-enums-qos.h"\n#include "qmi-enums-gas.h"\n#include "qmi-enums-dsd.h"\n#include "qmi-device.h"\n',
- '--template', files(join_paths(templates_dir, enum_types + '.h.template')),
+ '--template', files(templates_dir / enum_types + '.h.template'),
'--ftail', '#endif /* __LIBQMI_GLIB_ENUM_TYPES_H__ */\n',
'@INPUT@'],
capture: true,
@@ -82,7 +82,7 @@ gen_sources += custom_target(
python,
qmi_mkenums,
'--fhead', '#include "qmi-enum-types.h"\n',
- '--template', files(join_paths(templates_dir, enum_types + '.c.template')),
+ '--template', files(templates_dir / enum_types + '.c.template'),
'@INPUT@'],
capture: true,
)
@@ -98,7 +98,7 @@ gen_headers += custom_target(
python,
qmi_mkenums,
'--fhead', '#ifndef __LIBQMI_GLIB_ENUM_TYPES_PRIVATE_H__\n#define __LIBQMI_GLIB_ENUM_TYPES_PRIVATE_H__\n#include "qmi-enums-private.h"\n',
- '--template', files(join_paths(templates_dir, enum_types + '.h.template')),
+ '--template', files(templates_dir / enum_types + '.h.template'),
'--ftail', '#endif /* __LIBQMI_GLIB_ENUM_TYPES_PRIVATE_H__ */\n',
'@INPUT@'],
capture: true,
@@ -112,7 +112,7 @@ gen_sources += custom_target(
python,
qmi_mkenums,
'--fhead', '#include "qmi-enum-types-private.h"\n',
- '--template', files(join_paths(templates_dir, enum_types + '.c.template')),
+ '--template', files(templates_dir / enum_types + '.c.template'),
'@INPUT@'],
capture: true,
)
@@ -128,7 +128,7 @@ gen_headers += custom_target(
python,
qmi_mkenums,
'--fhead', '#ifndef __LIBQMI_GLIB_FLAGS64_TYPES_H__\n#define __LIBQMI_GLIB_FLAGS64_TYPES_H__\n#include "qmi-flags64-dms.h"\n#include "qmi-flags64-nas.h"\n#include "qmi-flags64-loc.h"\n#include "qmi-flags64-dsd.h"\n#include "qmi-flags64-wds.h"\n',
- '--template', files(join_paths(templates_dir, enum_types + '.h.template')),
+ '--template', files(templates_dir / enum_types + '.h.template'),
'--ftail', '#endif /* __LIBQMI_GLIB_FLAGS64_TYPES_H__ */\n',
'@INPUT@'],
capture: true,
@@ -144,21 +144,21 @@ gen_sources += custom_target(
python,
qmi_mkenums,
'--fhead', '#include "qmi-flags64-types.h"\n',
- '--template', files(join_paths(templates_dir, enum_types + '.c.template')),
+ '--template', files(templates_dir / enum_types + '.c.template'),
'@INPUT@'],
capture: true,
)
-qmi_common = join_paths(data_dir, 'qmi-common.json')
+qmi_common = data_dir / 'qmi-common.json'
service = 'ctl'
name = 'qmi-' + service
generated = custom_target(
name,
- input: join_paths(data_dir, 'qmi-service-@0@.json'.format(service)),
+ input: data_dir / 'qmi-service-@0@.json'.format(service),
output: [name + '.c', name + '.h', name + '.sections'],
- command: [qmi_codegen, '--input', '@INPUT@', '--include', qmi_common, '--output', join_paths('@OUTDIR@', name)],
+ command: [qmi_codegen, '--input', '@INPUT@', '--include', qmi_common, '--output', '@OUTDIR@' / name],
)
gen_sources += [generated[0], generated[1]]
@@ -191,7 +191,7 @@ command = [
]
if qmi_collection_name != 'full'
- command += ['--collection', join_paths(data_dir, 'qmi-collection-@0@.json'.format(qmi_collection_name))]
+ command += ['--collection', data_dir / 'qmi-collection-@0@.json'.format(qmi_collection_name)]
endif
foreach service: services
@@ -199,9 +199,9 @@ foreach service: services
generated = custom_target(
name,
- input: join_paths(data_dir, 'qmi-service-@0@.json'.format(service)),
+ input: data_dir / 'qmi-service-@0@.json'.format(service),
output: [name + '.c', name + '.h', name + '.sections'],
- command: command + ['--output', join_paths('@OUTDIR@', name)],
+ command: command + ['--output', '@OUTDIR@' / name],
install: true,
install_dir: [false, qmi_glib_pkgincludedir, false],
)
@@ -212,7 +212,7 @@ foreach service: services
# source file, to the path has to be used. the first workaround is to use the
# build paths to point to the files, and the second workaround is to use
# custom target objects to force its building.
- gen_sections += [join_paths(meson.current_build_dir(), name + '.sections')]
+ gen_sections += [meson.current_build_dir() / name + '.sections']
gen_sections_deps += [generated]
endforeach
diff --git a/src/libqmi-glib/meson.build b/src/libqmi-glib/meson.build
index b1aa56f..c8c6221 100644
--- a/src/libqmi-glib/meson.build
+++ b/src/libqmi-glib/meson.build
@@ -116,7 +116,7 @@ libqmi_glib = library(
sources: sources + [version_header],
include_directories: top_inc,
dependencies: deps,
- c_args: common_c_flags + ['-DLIBEXEC_PATH="@0@"'.format(join_paths(qmi_prefix, qmi_libexecdir))],
+ c_args: common_c_flags + ['-DLIBEXEC_PATH="@0@"'.format(qmi_prefix / qmi_libexecdir)],
link_whole: [libqmi_glib_compat, libqmi_glib_generated],
install: true,
)
diff --git a/src/qmi-firmware-update/meson.build b/src/qmi-firmware-update/meson.build
index 0d19f7a..289b158 100644
--- a/src/qmi-firmware-update/meson.build
+++ b/src/qmi-firmware-update/meson.build
@@ -64,7 +64,7 @@ sources += custom_target(
python,
qmi_mkenums,
'--fhead', '#ifndef QFU_ENUM_TYPES_H\n#define QFU_ENUM_TYPES_H\n#include "qfu-image.h"\n#include "qfu-qdl-message.h"\n#include "qfu-dload-message.h"\n#include "qfu-sahara-message.h"\n',
- '--template', files(join_paths(templates_dir, enum_types + '.h.template')),
+ '--template', files(templates_dir / enum_types + '.h.template'),
'--ftail', '#endif /* __QFUENUM_TYPES_H__ */\n',
'@INPUT@'],
capture: true,
@@ -78,7 +78,7 @@ sources += custom_target(
python,
qmi_mkenums,
'--fhead', '#include "qfu-enum-types.h"\n',
- '--template', files(join_paths(templates_dir, enum_types + '.c.template')),
+ '--template', files(templates_dir / enum_types + '.c.template'),
'@INPUT@'],
capture: true,
)
diff --git a/src/qmi-proxy/meson.build b/src/qmi-proxy/meson.build
index 7604c46..dd8f818 100644
--- a/src/qmi-proxy/meson.build
+++ b/src/qmi-proxy/meson.build
@@ -17,6 +17,6 @@ if enable_qmi_username
input: '76-qmi-proxy-device-ownership.rules.in',
output: '@BASENAME@',
configuration: config_h,
- install_dir: join_paths(udev_udevdir, 'rules.d'),
+ install_dir: udev_udevdir / 'rules.d',
)
endif