build-aux,mkenums: import custom mkenums tool from libqmi/libmbim
We're going to use certain new features included in the custom tool.
This commit is contained in:
committed by
Aleksander Morgado
parent
549e2f5118
commit
efcfce02a9
+65
-27
@@ -14,19 +14,32 @@ headers = files(
|
||||
enums_types = 'mm-helper-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-helper-enums-types.h"',
|
||||
input: headers,
|
||||
output: enums_types + '.c',
|
||||
command: [
|
||||
python,
|
||||
mm_mkenums,
|
||||
'--fhead', '#include "mm-helper-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-sms-part.h"\n#include "mm-modem-helpers.h"\n#ifndef __MM_HELPER_ENUMS_TYPES_H__\n#define __MM_HELPER_ENUMS_TYPES_H__\n',
|
||||
ftail: '#endif /* __MM_HELPER_ENUMS_TYPES_H__ */\n',
|
||||
input: headers,
|
||||
output: enums_types + '.h',
|
||||
command: [
|
||||
python,
|
||||
mm_mkenums,
|
||||
'--fhead', '#include "mm-sms-part.h"\n#include "mm-modem-helpers.h"\n#ifndef __MM_HELPER_ENUMS_TYPES_H__\n#define __MM_HELPER_ENUMS_TYPES_H__\n',
|
||||
'--template', files(templates_dir / enums_types + '.h.template'),
|
||||
'--ftail', '#endif /* __MM_HELPER_ENUMS_TYPES_H__ */\n',
|
||||
'@INPUT@'],
|
||||
capture: true,
|
||||
)
|
||||
|
||||
sources = files(
|
||||
@@ -149,19 +162,31 @@ endif
|
||||
enums_types = 'mm-port-enums-types'
|
||||
|
||||
port_enums_sources = []
|
||||
port_enums_sources += gnome.mkenums(
|
||||
port_enums_sources += custom_target(
|
||||
enums_types + '.c',
|
||||
sources: headers,
|
||||
c_template: build_aux_dir / enums_types + '.c.template',
|
||||
fhead: '#include "mm-port-enums-types.h"',
|
||||
input: headers,
|
||||
output: enums_types + '.c',
|
||||
command: [
|
||||
python,
|
||||
mm_mkenums,
|
||||
'--fhead', '#include "mm-port-enums-types.h"\n',
|
||||
'--template', files(templates_dir / enums_types + '.c.template'),
|
||||
'@INPUT@'],
|
||||
capture: true,
|
||||
)
|
||||
|
||||
port_enums_sources += gnome.mkenums(
|
||||
port_enums_sources += custom_target(
|
||||
enums_types + '.h',
|
||||
sources: headers,
|
||||
h_template: build_aux_dir / enums_types + '.h.template',
|
||||
fhead: '#include "config.h"\n#include "mm-port.h"\n#include "mm-port-serial-at.h"\n#if defined WITH_QMI\n#include "mm-port-qmi.h"\n#endif\n#ifndef __MM_PORT_ENUMS_TYPES_H__\n#define __MM_PORT_ENUMS_TYPES_H__\n',
|
||||
ftail: '#endif /* __MM_PORT_ENUMS_TYPES_H__ */\n',
|
||||
input: headers,
|
||||
output: enums_types + '.h',
|
||||
command: [
|
||||
python,
|
||||
mm_mkenums,
|
||||
'--fhead', '#include "config.h"\n#include "mm-port.h"\n#include "mm-port-serial-at.h"\n#if defined WITH_QMI\n#include "mm-port-qmi.h"\n#endif\n#ifndef __MM_PORT_ENUMS_TYPES_H__\n#define __MM_PORT_ENUMS_TYPES_H__\n',
|
||||
'--template', files(templates_dir / enums_types + '.h.template'),
|
||||
'--ftail', '#endif /* __MM_PORT_ENUMS_TYPES_H__ */\n',
|
||||
'@INPUT@'],
|
||||
capture: true,
|
||||
)
|
||||
|
||||
libport = static_library(
|
||||
@@ -188,19 +213,32 @@ headers = files(
|
||||
enums_types = 'mm-daemon-enums-types'
|
||||
|
||||
daemon_enums_sources = []
|
||||
daemon_enums_sources += gnome.mkenums(
|
||||
|
||||
daemon_enums_sources += custom_target(
|
||||
enums_types + '.c',
|
||||
sources: headers,
|
||||
c_template: build_aux_dir / enums_types + '.c.template',
|
||||
fhead: '#include "mm-daemon-enums-types.h"',
|
||||
input: headers,
|
||||
output: enums_types + '.c',
|
||||
command: [
|
||||
python,
|
||||
mm_mkenums,
|
||||
'--fhead', '#include "mm-daemon-enums-types.h"\n',
|
||||
'--template', files(templates_dir / enums_types + '.c.template'),
|
||||
'@INPUT@'],
|
||||
capture: true,
|
||||
)
|
||||
|
||||
daemon_enums_sources += gnome.mkenums(
|
||||
daemon_enums_sources += custom_target(
|
||||
enums_types + '.h',
|
||||
sources: headers,
|
||||
h_template: build_aux_dir / enums_types + '.h.template',
|
||||
fhead: '#include "mm-filter.h"\n#include "mm-base-bearer.h"\n#include "mm-port-probe.h"\n#ifndef __MM_DAEMON_ENUMS_TYPES_H__\n#define __MM_DAEMON_ENUMS_TYPES_H__\n',
|
||||
ftail: '#endif /* __MM_DAEMON_ENUMS_TYPES_H__ */\n',
|
||||
input: headers,
|
||||
output: enums_types + '.h',
|
||||
command: [
|
||||
python,
|
||||
mm_mkenums,
|
||||
'--fhead', '#include "mm-filter.h"\n#include "mm-base-bearer.h"\n#include "mm-port-probe.h"\n#ifndef __MM_DAEMON_ENUMS_TYPES_H__\n#define __MM_DAEMON_ENUMS_TYPES_H__\n',
|
||||
'--template', files(templates_dir / enums_types + '.h.template'),
|
||||
'--ftail', '#endif /* __MM_DAEMON_ENUMS_TYPES_H__ */\n',
|
||||
'@INPUT@'],
|
||||
capture: true,
|
||||
)
|
||||
|
||||
daemon_enums_types_dep = declare_dependency(
|
||||
|
||||
+63
-27
@@ -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': {
|
||||
|
||||
Reference in New Issue
Block a user