aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorAleksander Morgado <aleksandermj@chromium.org>2023-04-27 11:23:22 +0000
committerAleksander Morgado <aleksander@aleksander.es>2023-04-27 12:23:04 +0000
commitefcfce02a95fe43adb40c1e01e82e0719a217983 (patch)
tree6db930fd8f86ae4075a5eed620a9561f2b0666b5 /src/plugins
parent549e2f511874cc5d8b6ff4b8d0cca6aafe461a35 (diff)
build-aux,mkenums: import custom mkenums tool from libqmi/libmbim
We're going to use certain new features included in the custom tool.
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/meson.build90
1 files changed, 63 insertions, 27 deletions
diff --git a/src/plugins/meson.build b/src/plugins/meson.build
index 03093123..25e4918c 100644
--- a/src/plugins/meson.build
+++ b/src/plugins/meson.build
@@ -193,19 +193,31 @@ if plugins_shared['telit']
enums_types = 'mm-telit-enums-types'
- sources += gnome.mkenums(
+ sources += custom_target(
enums_types + '.c',
- sources: headers,
- c_template: build_aux_dir / enums_types + '.c.template',
- fhead: '#include "mm-telit-enums-types.h"',
+ input: headers,
+ output: enums_types + '.c',
+ command: [
+ python,
+ mm_mkenums,
+ '--fhead', '#include "mm-telit-enums-types.h"\n',
+ '--template', files(templates_dir / enums_types + '.c.template'),
+ '@INPUT@'],
+ capture: true,
)
- sources += gnome.mkenums(
+ sources += custom_target(
enums_types + '.h',
- sources: headers,
- h_template: build_aux_dir / enums_types + '.h.template',
- fhead: '#include "mm-modem-helpers-telit.h"\n#ifndef __MM_TELIT_ENUMS_TYPES_H__\n#define __MM_TELIT_ENUMS_TYPES_H__\n',
- ftail: '#endif /* __MM_TELIT_ENUMS_TYPES_H__ */\n',
+ input: headers,
+ output: enums_types + '.h',
+ command: [
+ python,
+ mm_mkenums,
+ '--fhead', '#include "mm-modem-helpers-telit.h"\n#ifndef __MM_TELIT_ENUMS_TYPES_H__\n#define __MM_TELIT_ENUMS_TYPES_H__\n',
+ '--template', files(templates_dir / enums_types + '.h.template'),
+ '--ftail', '#endif /* __MM_TELIT_ENUMS_TYPES_H__ */\n',
+ '@INPUT@'],
+ capture: true,
)
if enable_mbim
@@ -462,19 +474,31 @@ if plugins_options['huawei']
enums_types = 'mm-huawei-enums-types'
enums_sources = []
- enums_sources += gnome.mkenums(
+ enums_sources += custom_target(
enums_types + '.c',
- sources: headers,
- c_template: build_aux_dir / enums_types + '.c.template',
- fhead: '#include "mm-huawei-enums-types.h"',
+ input: headers,
+ output: enums_types + '.c',
+ command: [
+ python,
+ mm_mkenums,
+ '--fhead', '#include "mm-huawei-enums-types.h"\n',
+ '--template', files(templates_dir / enums_types + '.c.template'),
+ '@INPUT@'],
+ capture: true,
)
- enums_sources += gnome.mkenums(
+ enums_sources += custom_target(
enums_types + '.h',
- sources: headers,
- h_template: build_aux_dir / enums_types + '.h.template',
- fhead: '#include "mm-modem-helpers-huawei.h"\n#ifndef __MM_HUAWEI_ENUMS_TYPES_H__\n#define __MM_HUAWEI_ENUMS_TYPES_H__\n',
- ftail: '#endif /* __MM_HUAWEI_ENUMS_TYPES_H__ */\n',
+ input: headers,
+ output: enums_types + '.h',
+ command: [
+ python,
+ mm_mkenums,
+ '--fhead', '#include "mm-modem-helpers-huawei.h"\n#ifndef __MM_HUAWEI_ENUMS_TYPES_H__\n#define __MM_HUAWEI_ENUMS_TYPES_H__\n',
+ '--template', files(templates_dir / enums_types + '.h.template'),
+ '--ftail', '#endif /* __MM_HUAWEI_ENUMS_TYPES_H__ */\n',
+ '@INPUT@'],
+ capture: true,
)
plugins += {'plugin-huawei': {
@@ -873,19 +897,31 @@ if plugins_options['ublox']
enums_types = 'mm-ublox-enums-types'
- sources += gnome.mkenums(
+ sources += custom_target(
enums_types + '.c',
- sources: headers,
- c_template: build_aux_dir / enums_types + '.c.template',
- fhead: '#include "mm-ublox-enums-types.h"',
+ input: headers,
+ output: enums_types + '.c',
+ command: [
+ python,
+ mm_mkenums,
+ '--fhead', '#include "mm-ublox-enums-types.h"\n',
+ '--template', files(templates_dir / enums_types + '.c.template'),
+ '@INPUT@'],
+ capture: true,
)
- sources += gnome.mkenums(
+ sources += custom_target(
enums_types + '.h',
- sources: headers,
- h_template: build_aux_dir / enums_types + '.h.template',
- fhead: '#include "mm-modem-helpers-ublox.h"\n#ifndef __MM_UBLOX_ENUMS_TYPES_H__\n#define __MM_UBLOX_ENUMS_TYPES_H__\n',
- ftail: '#endif /* __MM_UBLOX_ENUMS_TYPES_H__ */\n',
+ input: headers,
+ output: enums_types + '.h',
+ command: [
+ python,
+ mm_mkenums,
+ '--fhead', '#include "mm-modem-helpers-ublox.h"\n#ifndef __MM_UBLOX_ENUMS_TYPES_H__\n#define __MM_UBLOX_ENUMS_TYPES_H__\n',
+ '--template', files(templates_dir / enums_types + '.h.template'),
+ '--ftail', '#endif /* __MM_UBLOX_ENUMS_TYPES_H__ */\n',
+ '@INPUT@'],
+ capture: true,
)
plugins += {'plugin-ublox': {