Revert "build,meson: Improve plugins option set"

This reverts commit 09a5052a77.

This commit breaks the default disabling of the qcom-soc plugin.
This commit is contained in:
Aleksander Morgado
2021-09-15 13:45:16 +02:00
parent 101ed56711
commit b75d1d50d7
2 changed files with 147 additions and 109 deletions

View File

@@ -265,85 +265,75 @@ enable_vapi = get_option('vapi')
# gtkdoc support
enable_gtk_doc = get_option('gtk_doc')
enable_plugins = not get_option('plugin_disable_all')
plugins_shared = {
'foxconn': enable_mbim and enable_plugins,
'icera': enable_plugins,
'novatel': enable_plugins,
'option': enable_plugins,
'sierra': enable_plugins,
'telit': enable_plugins,
'xmm': enable_plugins,
'foxconn': enable_mbim,
'icera': true,
'novatel': true,
'option': true,
'sierra': true,
'telit': true,
'xmm': true,
}
plugins_options = {
'altair-lte': enable_plugins,
'anydata': enable_plugins,
'broadmobi': enable_plugins,
'cinterion': enable_plugins,
'dell': enable_plugins,
'dlink': enable_plugins,
'fibocom': enable_plugins,
'foxconn': enable_plugins,
'generic': enable_plugins,
'gosuncn': enable_plugins,
'haier': enable_plugins,
'huawei': enable_plugins,
'iridium': enable_plugins,
'linktop': enable_plugins,
'longcheer': enable_plugins,
'mbm': enable_plugins,
'motorola': enable_plugins,
'mtk': enable_plugins,
'nokia': enable_plugins,
'nokia-icera': enable_plugins,
'novatel': enable_plugins,
'novatel-lte': enable_plugins,
'option': enable_plugins,
'option-hso': enable_plugins,
'pantech': enable_plugins,
'qcom-soc': enable_plugins,
'quectel': enable_plugins,
'samsung': enable_plugins,
'sierra-legacy': enable_plugins,
'sierra': enable_plugins,
'simtech': enable_plugins,
'telit': enable_plugins,
'thuraya': enable_plugins,
'tplink': enable_plugins,
'ublox': enable_plugins,
'via': enable_plugins,
'wavecom': enable_plugins,
'x22x': enable_plugins,
'zte': enable_plugins,
}
plugins_options_reqs = {
'altair-lte': [],
'anydata': [],
'broadmobi': [],
'cinterion': [],
'dell': ['foxconn', 'novatel', 'sierra', 'telit', 'xmm'],
'dlink': [],
'fibocom': ['xmm'],
'foxconn': ['foxconn'],
'generic': [],
'gosuncn': [],
'haier': [],
'huawei': [],
'iridium': [],
'linktop': [],
'longcheer': [],
'mbm': [],
'motorola': [],
'mtk': [],
'nokia': [],
'nokia-icera': ['icera'],
'novatel': ['novatel'],
'novatel-lte': [],
'option': ['option'],
'option-hso': ['option'],
'pantech': [],
'qcom-soc': [],
'quectel': [],
'samsung': ['icera'],
'sierra-legacy': ['icera', 'sierra'],
'sierra': ['xmm'],
'simtech': [],
'telit': ['telit'],
'thuraya': [],
'tplink': [],
'ublox': [],
'via': [],
'wavecom': [],
'x22x': [],
'zte': ['icera'],
}
foreach plugin_name, _: plugins_options
if get_option('plugin_' + plugin_name.underscorify())
foreach plugin_req: plugins_options_reqs.get(plugin_name, [])
if not plugins_shared[plugin_req]
assert(not enable_plugins, '@0@ required @1@ but is not available'.format(plugin_name, plugin_req))
plugins_shared += {plugin_req: true}
endif
endforeach
endif
endforeach
disable_all_plugins = get_option('plugin_disable_all')
enable_plugins = []
enable_plugins_shared = []
if not disable_all_plugins
foreach plugin_name, plugin_shared_reqs: plugins_options
if get_option('plugin_' + plugin_name.underscorify())
enable_plugins += [plugin_name]
foreach plugin_req: plugin_shared_reqs
assert(plugins_shared[plugin_req], '@0@ required @1@ but is not available'.format(plugin_name, plugin_req))
if not enable_plugins_shared.contains(plugin_req)
enable_plugins_shared += [plugin_req]
endif
endforeach
endif
endforeach
endif
version_conf = {
'MM_MAJOR_VERSION': mm_major_version,
@@ -407,9 +397,57 @@ summary({
'at command via dbus': enable_at_command_via_dbus,
}, section: 'Features')
summary(plugins_shared, section: 'Shared utils')
summary({
'foxconn': enable_plugins_shared.contains('foxconn'),
'icera': enable_plugins_shared.contains('icera'),
'novatel': enable_plugins_shared.contains('novatel'),
'option': enable_plugins_shared.contains('option'),
'sierra': enable_plugins_shared.contains('sierra'),
'telit': enable_plugins_shared.contains('telit'),
'xmm': enable_plugins_shared.contains('xmm'),
}, section: 'Shared utils')
summary(plugins_options, section: 'Plugins')
summary({
'altair-lte': enable_plugins.contains('altair-lte'),
'anydata': enable_plugins.contains('anydata'),
'broadmobi': enable_plugins.contains('broadmobi'),
'cinterion': enable_plugins.contains('cinterion'),
'dell': enable_plugins.contains('dell'),
'dlink': enable_plugins.contains('dlink'),
'fibocom': enable_plugins.contains('fibocom'),
'foxconn': enable_plugins.contains('foxconn'),
'generic': enable_plugins.contains('generic'),
'gosuncn': enable_plugins.contains('gosuncn'),
'haier': enable_plugins.contains('haier'),
'huawei': enable_plugins.contains('huawei'),
'iridium': enable_plugins.contains('iridium'),
'linktop': enable_plugins.contains('linktop'),
'longcheer': enable_plugins.contains('longcheer'),
'mbm': enable_plugins.contains('mbm'),
'motorola': enable_plugins.contains('motorola'),
'mtk': enable_plugins.contains('mtk'),
'nokia': enable_plugins.contains('nokia'),
'nokia-icera': enable_plugins.contains('nokia-icera'),
'novatel': enable_plugins.contains('novatel'),
'novatel-lte': enable_plugins.contains('novatel-lte'),
'option': enable_plugins.contains('option'),
'option-hso': enable_plugins.contains('option-hso'),
'pantech': enable_plugins.contains('pantech'),
'qcom-soc': enable_plugins.contains('qcom-soc'),
'quectel': enable_plugins.contains('quectel'),
'samsung': enable_plugins.contains('samsung'),
'sierra': enable_plugins.contains('sierra'),
'sierra-legacy': enable_plugins.contains('sierra-legacy'),
'simtech': enable_plugins.contains('simtech'),
'telit': enable_plugins.contains('telit'),
'thuraya': enable_plugins.contains('thuraya'),
'tplink': enable_plugins.contains('tplink'),
'ublox': enable_plugins.contains('ublox'),
'via': enable_plugins.contains('via'),
'wavecom': enable_plugins.contains('wavecom'),
'x22x': enable_plugins.contains('x22x'),
'zte': enable_plugins.contains('zte'),
}, section: 'Plugins')
summary({
'gobject introspection': enable_gir,

View File

@@ -49,7 +49,7 @@ plugins_deps = [
]
# Common Foxconn modem support library (MBIM only)
if plugins_shared['foxconn']
if enable_plugins_shared.contains('foxconn')
foxconn_inc = include_directories('foxconn')
sources = files(
@@ -69,7 +69,7 @@ if plugins_shared['foxconn']
endif
# common icera support
if plugins_shared['icera']
if enable_plugins_shared.contains('icera')
icera_inc = include_directories('icera')
common_c_args = '-DMM_MODULE_NAME="shared-icera"'
@@ -89,7 +89,7 @@ if plugins_shared['icera']
endif
# common novatel support
if plugins_shared['novatel']
if enable_plugins_shared.contains('novatel')
novatel_inc = include_directories('novatel')
sources = files(
@@ -105,7 +105,7 @@ if plugins_shared['novatel']
endif
# common option support
if plugins_shared['option']
if enable_plugins_shared.contains('option')
sources = files(
'option/mm-broadband-modem-option.c',
'option/mm-shared.c',
@@ -120,7 +120,7 @@ if plugins_shared['option']
endif
# common sierra support
if plugins_shared['sierra']
if enable_plugins_shared.contains('sierra')
sierra_inc = include_directories('sierra')
common_c_args = '-DMM_MODULE_NAME="shared-sierra"'
@@ -142,7 +142,7 @@ if plugins_shared['sierra']
endif
# common telit support
if plugins_shared['telit']
if enable_plugins_shared.contains('telit')
telit_inc = include_directories('telit')
common_c_args = '-DMM_MODULE_NAME="shared-telit"'
@@ -186,7 +186,7 @@ if plugins_shared['telit']
endif
# common xmm support
if plugins_shared['xmm']
if enable_plugins_shared.contains('xmm')
xmm_inc = include_directories('xmm')
common_c_args = '-DMM_MODULE_NAME="shared-xmm"'
@@ -210,7 +210,7 @@ if plugins_shared['xmm']
endif
# plugin: altair lte
if plugins_options['altair-lte']
if enable_plugins.contains('altair-lte')
common_c_args = '-DMM_MODULE_NAME="altair-lte"'
sources = files(
@@ -228,7 +228,7 @@ if plugins_options['altair-lte']
endif
# plugin: anydata
if plugins_options['anydata']
if enable_plugins.contains('anydata')
sources = files(
'anydata/mm-broadband-modem-anydata.c',
'anydata/mm-plugin-anydata.c',
@@ -241,7 +241,7 @@ if plugins_options['anydata']
endif
# plugin: broadmobi
if plugins_options['broadmobi']
if enable_plugins.contains('broadmobi')
c_args = [
'-DMM_MODULE_NAME="broadmobi"',
'-DTESTUDEVRULESDIR_BROADMOBI="@0@"'.format(plugins_dir / 'broadmobi'),
@@ -256,7 +256,7 @@ if plugins_options['broadmobi']
endif
# plugin: cinterion (previously siemens)
if plugins_options['cinterion']
if enable_plugins.contains('cinterion')
common_c_args = [
'-DMM_MODULE_NAME="cinterion"',
'-DTESTUDEVRULESDIR_CINTERION="@0@"'.format(plugins_dir / 'cinterion'),
@@ -288,7 +288,7 @@ if plugins_options['cinterion']
endif
# plugin: dell
if plugins_options['dell']
if enable_plugins.contains('dell')
incs = plugins_incs + [
foxconn_inc,
novatel_inc,
@@ -311,7 +311,7 @@ if plugins_options['dell']
endif
# plugin: dlink
if plugins_options['dlink']
if enable_plugins.contains('dlink')
c_args = [
'-DMM_MODULE_NAME="d-link"',
'-DTESTUDEVRULESDIR_DLINK="@0@"'.format(plugins_dir / 'dlink'),
@@ -326,7 +326,7 @@ if plugins_options['dlink']
endif
# plugin: fibocom
if plugins_options['fibocom']
if enable_plugins.contains('fibocom')
c_args = [
'-DMM_MODULE_NAME="fibocom"',
'-DTESTUDEVRULESDIR_FIBOCOM="@0@"'.format(plugins_dir / 'fibocom'),
@@ -341,7 +341,7 @@ if plugins_options['fibocom']
endif
# plugin: foxconn
if plugins_options['foxconn']
if enable_plugins.contains('foxconn')
foxconn_dir = plugins_dir / 'foxconn'
c_args = [
@@ -364,7 +364,7 @@ if plugins_options['foxconn']
endif
# plugin: generic
if plugins_options['generic']
if enable_plugins.contains('generic')
# FIXME
'''
15/16 test-service-generic FAIL 0.02s killed by signal 5 SIGTRAP
@@ -391,7 +391,7 @@ if plugins_options['generic']
endif
# plugin: gosuncn
if plugins_options['gosuncn']
if enable_plugins.contains('gosuncn')
c_args = [
'-DMM_MODULE_NAME="gosuncn"',
'-DTESTUDEVRULESDIR_GOSUNCN="@0@"'.format(plugins_dir / 'gosuncn'),
@@ -406,7 +406,7 @@ if plugins_options['gosuncn']
endif
# plugin: haier
if plugins_options['haier']
if enable_plugins.contains('haier')
c_args = [
'-DMM_MODULE_NAME="haier"',
'-DTESTUDEVRULESDIR_HAIER="@0@"'.format(plugins_dir / 'haier'),
@@ -421,7 +421,7 @@ if plugins_options['haier']
endif
# plugin: huawei
if plugins_options['huawei']
if enable_plugins.contains('huawei')
huawei_inc = include_directories('huawei')
common_c_args = ['-DTESTUDEVRULESDIR_HUAWEI="@0@"'.format(plugins_dir / 'huawei')]
@@ -464,7 +464,7 @@ if plugins_options['huawei']
endif
# plugin: iridium
if plugins_options['iridium']
if enable_plugins.contains('iridium')
sources = files(
'iridium/mm-bearer-iridium.c',
'iridium/mm-broadband-modem-iridium.c',
@@ -479,7 +479,7 @@ if plugins_options['iridium']
endif
# plugin: linktop
if plugins_options['linktop']
if enable_plugins.contains('linktop')
common_c_args = '-DMM_MODULE_NAME="linktop"'
sources = files(
@@ -496,7 +496,7 @@ if plugins_options['linktop']
endif
# plugin: longcheer (and rebranded dongles)
if plugins_options['longcheer']
if enable_plugins.contains('longcheer')
sources = files(
'longcheer/mm-broadband-modem-longcheer.c',
'longcheer/mm-plugin-longcheer.c',
@@ -516,7 +516,7 @@ if plugins_options['longcheer']
endif
# plugin: ericsson mbm
if plugins_options['mbm']
if enable_plugins.contains('mbm')
common_c_args = ['-DTESTUDEVRULESDIR_MBM="@0@"'.format(plugins_dir / 'mbm')]
sources = files(
@@ -537,7 +537,7 @@ if plugins_options['mbm']
endif
# plugin: motorola
if plugins_options['motorola']
if enable_plugins.contains('motorola')
sources = files(
'motorola/mm-broadband-modem-motorola.c',
'motorola/mm-plugin-motorola.c',
@@ -550,7 +550,7 @@ if plugins_options['motorola']
endif
# plugin: mtk
if plugins_options['mtk']
if enable_plugins.contains('mtk')
sources = files(
'mtk/mm-broadband-modem-mtk.c',
'mtk/mm-plugin-mtk.c',
@@ -570,7 +570,7 @@ if plugins_options['mtk']
endif
# plugin: nokia
if plugins_options['nokia']
if enable_plugins.contains('nokia')
sources = files(
'nokia/mm-broadband-modem-nokia.c',
'nokia/mm-plugin-nokia.c',
@@ -584,7 +584,7 @@ if plugins_options['nokia']
endif
# plugin: nokia (icera)
if plugins_options['nokia-icera']
if enable_plugins.contains('nokia-icera')
c_args = [
'-DMM_MODULE_NAME="nokia-icera"',
'-DTESTUDEVRULESDIR_NOKIA_ICERA="@0@"'.format(plugins_dir / 'nokia'),
@@ -599,7 +599,7 @@ if plugins_options['nokia-icera']
endif
# plugin: novatel non-lte
if plugins_options['novatel']
if enable_plugins.contains('novatel')
plugins += {'plugin-novatel': {
'plugin': true,
'module': {'sources': files('novatel/mm-plugin-novatel.c'), 'include_directories': plugins_incs, 'c_args': '-DMM_MODULE_NAME="novatel"'},
@@ -607,7 +607,7 @@ if plugins_options['novatel']
endif
# plugin: novatel lte
if plugins_options['novatel-lte']
if enable_plugins.contains('novatel-lte')
sources = files(
'novatel/mm-plugin-novatel-lte.c',
'novatel/mm-broadband-modem-novatel-lte.c',
@@ -622,7 +622,7 @@ if plugins_options['novatel-lte']
endif
# plugin: option
if plugins_options['option']
if enable_plugins.contains('option')
plugins += {'plugin-option': {
'plugin': true,
'module': {'sources': files('option/mm-plugin-option.c'), 'include_directories': plugins_incs, 'c_args': '-DMM_MODULE_NAME="option"'},
@@ -630,7 +630,7 @@ if plugins_options['option']
endif
# plugin: option hso
if plugins_options['option-hso']
if enable_plugins.contains('option-hso')
sources = files(
'option/mm-plugin-hso.c',
'option/mm-broadband-bearer-hso.c',
@@ -644,7 +644,7 @@ if plugins_options['option-hso']
endif
# plugin: pantech
if plugins_options['pantech']
if enable_plugins.contains('pantech')
sources = files(
'pantech/mm-broadband-modem-pantech.c',
'pantech/mm-plugin-pantech.c',
@@ -658,7 +658,7 @@ if plugins_options['pantech']
endif
# plugin: qcom-soc
if plugins_options['qcom-soc']
if enable_plugins.contains('qcom-soc')
sources = files(
'qcom-soc/mm-broadband-modem-qmi-qcom-soc.c',
'qcom-soc/mm-plugin-qcom-soc.c',
@@ -678,7 +678,7 @@ if plugins_options['qcom-soc']
endif
# plugin: quectel
if plugins_options['quectel']
if enable_plugins.contains('quectel')
common_c_args = ['-DTESTUDEVRULESDIR_QUECTEL="@0@"'.format(plugins_dir / 'quectel')]
sources = files(
@@ -706,7 +706,7 @@ if plugins_options['quectel']
endif
# plugin: samsung
if plugins_options['samsung']
if enable_plugins.contains('samsung')
sources = files(
'samsung/mm-broadband-modem-samsung.c',
'samsung/mm-plugin-samsung.c',
@@ -719,7 +719,7 @@ if plugins_options['samsung']
endif
# plugin: sierra (legacy)
if plugins_options['sierra-legacy']
if enable_plugins.contains('sierra-legacy')
sources = files(
'sierra/mm-broadband-modem-sierra-icera.c',
'sierra/mm-plugin-sierra-legacy.c',
@@ -732,7 +732,7 @@ if plugins_options['sierra-legacy']
endif
# plugin: sierra (new QMI or MBIM modems)
if plugins_options['sierra']
if enable_plugins.contains('sierra')
plugins += {'plugin-sierra': {
'plugin': true,
'module': {'sources': files('sierra/mm-plugin-sierra.c'), 'include_directories': plugins_incs + [xmm_inc], 'c_args': '-DMM_MODULE_NAME="sierra"'},
@@ -742,7 +742,7 @@ if plugins_options['sierra']
endif
# plugin: simtech
if plugins_options['simtech']
if enable_plugins.contains('simtech')
common_c_args = ['-DTESTUDEVRULESDIR_SIMTECH="@0@"'.format(plugins_dir / 'simtech')]
sources = files(
@@ -766,7 +766,7 @@ if plugins_options['simtech']
endif
# plugin: telit
if plugins_options['telit']
if enable_plugins.contains('telit')
c_args = [
'-DMM_MODULE_NAME="telit"',
'-DTESTUDEVRULESDIR_TELIT="@0@"'.format(plugins_dir / 'telit'),
@@ -781,7 +781,7 @@ if plugins_options['telit']
endif
# plugin: thuraya xt
if plugins_options['thuraya']
if enable_plugins.contains('thuraya')
common_c_args = ['-DMM_MODULE_NAME="thuraya"']
sources = files(
@@ -798,7 +798,7 @@ if plugins_options['thuraya']
endif
# plugin: tplink
if plugins_options['tplink']
if enable_plugins.contains('tplink')
c_args = [
'-DMM_MODULE_NAME="tp-link"',
'-DTESTUDEVRULESDIR_TPLINK="@0@"'.format(plugins_dir / 'tplink'),
@@ -813,7 +813,7 @@ if plugins_options['tplink']
endif
# plugin: u-blox
if plugins_options['ublox']
if enable_plugins.contains('ublox')
ublox_inc = include_directories('ublox')
common_c_args = '-DMM_MODULE_NAME="u-blox"'
@@ -855,7 +855,7 @@ if plugins_options['ublox']
endif
# plugin: via
if plugins_options['via']
if enable_plugins.contains('via')
sources = files(
'via/mm-broadband-modem-via.c',
'via/mm-plugin-via.c',
@@ -868,7 +868,7 @@ if plugins_options['via']
endif
# plugin: wavecom (now sierra airlink)
if plugins_options['wavecom']
if enable_plugins.contains('wavecom')
sources = files(
'wavecom/mm-broadband-modem-wavecom.c',
'wavecom/mm-plugin-wavecom.c',
@@ -881,7 +881,7 @@ if plugins_options['wavecom']
endif
# plugin: alcatel/TCT/JRD x220D and possibly others
if plugins_options['x22x']
if enable_plugins.contains('x22x')
sources = files(
'x22x/mm-broadband-modem-x22x.c',
'x22x/mm-plugin-x22x.c',
@@ -901,7 +901,7 @@ if plugins_options['x22x']
endif
# plugin: zte
if plugins_options['zte']
if enable_plugins.contains('zte')
sources = files(
'zte/mm-broadband-modem-zte.c',
'zte/mm-broadband-modem-zte-icera.c',