Skip to content
Snippets Groups Projects
Commit 7fe355d4 authored by Inigo Martínez's avatar Inigo Martínez
Browse files

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-
parent ba4c55e0
No related branches found
No related tags found
No related merge requests found
......@@ -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
......@@ -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'
......
......@@ -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('.')
......
......@@ -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
......
......@@ -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,
)
......
......@@ -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,
)
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment