build/meson: merge branch 'inigomartinez:meson-update'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/256
This commit is contained in:
@@ -3399,7 +3399,6 @@ EXTRA_DIST += \
|
|||||||
src/devices/wwan/libnm-wwan.ver \
|
src/devices/wwan/libnm-wwan.ver \
|
||||||
src/devices/wwan/meson.build \
|
src/devices/wwan/meson.build \
|
||||||
src/devices/wwan/tests/test-service-providers.xml \
|
src/devices/wwan/tests/test-service-providers.xml \
|
||||||
src/devices/wwan/tests/meson.build \
|
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -3486,7 +3485,8 @@ check_local += check-local-devices-bluetooth
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
EXTRA_DIST += \
|
EXTRA_DIST += \
|
||||||
src/devices/bluetooth/meson.build
|
src/devices/bluetooth/meson.build \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# src/devices/wifi
|
# src/devices/wifi
|
||||||
@@ -3558,7 +3558,7 @@ endif
|
|||||||
|
|
||||||
EXTRA_DIST += \
|
EXTRA_DIST += \
|
||||||
src/devices/wifi/meson.build \
|
src/devices/wifi/meson.build \
|
||||||
src/devices/wifi/tests/meson.build
|
$(NULL)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# src/devices/team
|
# src/devices/team
|
||||||
|
@@ -19,17 +19,11 @@ sources = files(
|
|||||||
)
|
)
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
libnm_dep,
|
|
||||||
libnmc_base_dep,
|
libnmc_base_dep,
|
||||||
libnmc_dep,
|
libnmc_dep,
|
||||||
libnm_core_dep,
|
|
||||||
readline_dep,
|
readline_dep,
|
||||||
]
|
]
|
||||||
|
|
||||||
cflags = clients_cflags + [
|
|
||||||
'-DG_LOG_DOMAIN="@0@"'.format(name),
|
|
||||||
]
|
|
||||||
|
|
||||||
if enable_polkit_agent
|
if enable_polkit_agent
|
||||||
sources += nm_polkit_listener
|
sources += nm_polkit_listener
|
||||||
|
|
||||||
@@ -40,7 +34,7 @@ executable(
|
|||||||
name,
|
name,
|
||||||
sources,
|
sources,
|
||||||
dependencies: deps,
|
dependencies: deps,
|
||||||
c_args: cflags,
|
c_args: clients_c_flags + ['-DG_LOG_DOMAIN="@0@"'.format(name)],
|
||||||
link_args: ldflags_linker_script_binary,
|
link_args: ldflags_linker_script_binary,
|
||||||
link_depends: linker_script_binary,
|
link_depends: linker_script_binary,
|
||||||
install: true,
|
install: true,
|
||||||
|
@@ -2,28 +2,29 @@ common_inc = include_directories('.')
|
|||||||
|
|
||||||
nm_polkit_listener = files('nm-polkit-listener.c')
|
nm_polkit_listener = files('nm-polkit-listener.c')
|
||||||
|
|
||||||
deps = [
|
common_deps = [
|
||||||
libnm_dep,
|
libnm_dep,
|
||||||
shared_nm_libnm_core_aux_dep,
|
libnm_nm_default_dep,
|
||||||
]
|
]
|
||||||
|
|
||||||
cflags = clients_cflags + [
|
common_c_flags = clients_c_flags + ['-DG_LOG_DOMAIN="libnmc"']
|
||||||
'-DG_LOG_DOMAIN="libnmc"',
|
|
||||||
]
|
|
||||||
|
|
||||||
libnmc_base = static_library(
|
sources = files(
|
||||||
'nmc-base',
|
|
||||||
sources: files(
|
|
||||||
'nm-client-utils.c',
|
'nm-client-utils.c',
|
||||||
'nm-secret-agent-simple.c',
|
'nm-secret-agent-simple.c',
|
||||||
'nm-vpn-helpers.c',
|
'nm-vpn-helpers.c',
|
||||||
),
|
)
|
||||||
dependencies: deps,
|
|
||||||
c_args: cflags,
|
libnmc_base = static_library(
|
||||||
|
'nmc-base',
|
||||||
|
sources: sources,
|
||||||
|
dependencies: common_deps,
|
||||||
|
c_args: common_c_flags,
|
||||||
)
|
)
|
||||||
|
|
||||||
libnmc_base_dep = declare_dependency(
|
libnmc_base_dep = declare_dependency(
|
||||||
include_directories: common_inc,
|
include_directories: common_inc,
|
||||||
|
dependencies: common_deps,
|
||||||
link_with: libnmc_base,
|
link_with: libnmc_base,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -39,31 +40,33 @@ if enable_introspection
|
|||||||
|
|
||||||
test(
|
test(
|
||||||
'check-settings-docs',
|
'check-settings-docs',
|
||||||
find_program(join_paths(meson.source_root(), 'tools', 'check-settings-docs.sh')),
|
find_program(join_paths(source_root, 'tools', 'check-settings-docs.sh')),
|
||||||
args: [meson.source_root(), meson.build_root(), 'clients/common/' + settings_docs]
|
args: [source_root, build_root, 'clients/common/' + settings_docs],
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
settings_docs_source = configure_file(
|
settings_docs_source = configure_file(
|
||||||
input: settings_docs + '.in',
|
input: settings_docs + '.in',
|
||||||
output: settings_docs,
|
output: '@BASENAME@',
|
||||||
configuration: configuration_data(),
|
configuration: configuration_data(),
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libnmc = static_library(
|
sources = nm_meta_setting_source + [settings_docs_source] + files(
|
||||||
'nmc',
|
|
||||||
sources: files(
|
|
||||||
'nm-meta-setting-access.c',
|
'nm-meta-setting-access.c',
|
||||||
'nm-meta-setting-desc.c',
|
'nm-meta-setting-desc.c',
|
||||||
) + shared_nm_meta_setting_c + [settings_docs_source],
|
)
|
||||||
dependencies: deps,
|
|
||||||
c_args: cflags,
|
libnmc = static_library(
|
||||||
link_with: libnmc_base,
|
'nmc',
|
||||||
|
sources: sources,
|
||||||
|
dependencies: common_deps + [libnm_libnm_core_aux_dep],
|
||||||
|
c_args: c_flags,
|
||||||
link_depends: settings_docs_source,
|
link_depends: settings_docs_source,
|
||||||
)
|
)
|
||||||
|
|
||||||
libnmc_dep = declare_dependency(
|
libnmc_dep = declare_dependency(
|
||||||
include_directories: common_inc,
|
include_directories: common_inc,
|
||||||
|
dependencies: common_deps,
|
||||||
link_with: libnmc,
|
link_with: libnmc,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -1,43 +1,43 @@
|
|||||||
|
common_c_flags = clients_c_flags + ['-DNETWORKMANAGER_COMPILATION_TEST']
|
||||||
|
|
||||||
test_name = 'test-clients-common'
|
test_name = 'test-clients-common'
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
libnmc_base_dep,
|
||||||
|
libnmc_dep,
|
||||||
|
]
|
||||||
|
|
||||||
exe = executable(
|
exe = executable(
|
||||||
test_name,
|
test_name,
|
||||||
test_name + '.c',
|
test_name + '.c',
|
||||||
dependencies: [
|
dependencies: deps,
|
||||||
libnm_dep,
|
c_args: common_c_flags,
|
||||||
libnmc_dep,
|
|
||||||
libnmc_base_dep,
|
|
||||||
libnm_core_dep,
|
|
||||||
],
|
|
||||||
c_args: clients_cflags + [
|
|
||||||
'-DNETWORKMANAGER_COMPILATION_TEST',
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
test_name,
|
'clients/common/tests/' + test_name,
|
||||||
test_script,
|
test_script,
|
||||||
args: test_args + [exe.full_path()],
|
args: test_args + [exe.full_path()],
|
||||||
)
|
)
|
||||||
|
|
||||||
###############################################################################
|
test_name = 'test-libnm-core-aux'
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
libnm_dep,
|
||||||
|
libnm_libnm_core_aux_dep,
|
||||||
|
libnm_nm_default_dep,
|
||||||
|
]
|
||||||
|
|
||||||
exe = executable(
|
exe = executable(
|
||||||
'test-libnm-core-aux',
|
test_name,
|
||||||
[ 'test-libnm-core-aux.c', ],
|
test_name + '.c',
|
||||||
c_args: [
|
dependencies: deps,
|
||||||
'-DNETWORKMANAGER_COMPILATION_TEST',
|
c_args: common_c_flags,
|
||||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
|
link_with: libnm_systemd_logging_stub,
|
||||||
],
|
|
||||||
dependencies: [
|
|
||||||
libnm_dep,
|
|
||||||
shared_nm_libnm_core_aux_dep,
|
|
||||||
shared_nm_libnm_core_intern_dep,
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
'clients/common/tests/test-libnm-core-aux',
|
'clients/common/tests/' + test_name,
|
||||||
test_script,
|
test_script,
|
||||||
args: test_args + [exe.full_path()]
|
args: test_args + [exe.full_path()]
|
||||||
)
|
)
|
||||||
|
@@ -1,23 +1,17 @@
|
|||||||
|
clients_c_flags = ['-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT']
|
||||||
|
|
||||||
name = 'nm-online'
|
name = 'nm-online'
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
libnm_dep,
|
libnm_dep,
|
||||||
libnm_core_dep,
|
libnm_nm_default_dep,
|
||||||
]
|
|
||||||
|
|
||||||
clients_cflags = [
|
|
||||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
|
|
||||||
]
|
|
||||||
|
|
||||||
cflags = clients_cflags + [
|
|
||||||
'-DG_LOG_DOMAIN="@0@"'.format(name),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
executable(
|
executable(
|
||||||
name,
|
name,
|
||||||
name + '.c',
|
name + '.c',
|
||||||
dependencies: deps,
|
dependencies: deps,
|
||||||
c_args: cflags,
|
c_args: clients_c_flags + ['-DG_LOG_DOMAIN="@0@"'.format(name)],
|
||||||
link_args: ldflags_linker_script_binary,
|
link_args: ldflags_linker_script_binary,
|
||||||
link_depends: linker_script_binary,
|
link_depends: linker_script_binary,
|
||||||
install: true,
|
install: true,
|
||||||
|
@@ -1,13 +1,6 @@
|
|||||||
name = 'nmtui'
|
name = 'nmtui'
|
||||||
|
|
||||||
deps = [
|
common_c_flags = clients_c_flags + ['-DG_LOG_DOMAIN="@0@"'.format(name)]
|
||||||
newt_dep,
|
|
||||||
libnm_core_dep,
|
|
||||||
]
|
|
||||||
|
|
||||||
cflags = clients_cflags + [
|
|
||||||
'-DG_LOG_DOMAIN="@0@"'.format(name),
|
|
||||||
]
|
|
||||||
|
|
||||||
subdir('newt')
|
subdir('newt')
|
||||||
|
|
||||||
@@ -54,10 +47,9 @@ sources = files(
|
|||||||
'nmt-widget-list.c',
|
'nmt-widget-list.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
deps += [
|
deps = [
|
||||||
libnm_dep,
|
|
||||||
libnmc_dep,
|
|
||||||
libnmc_base_dep,
|
libnmc_base_dep,
|
||||||
|
libnmc_dep,
|
||||||
libnmt_newt_dep,
|
libnmt_newt_dep,
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -65,7 +57,8 @@ executable(
|
|||||||
name,
|
name,
|
||||||
sources,
|
sources,
|
||||||
dependencies: deps,
|
dependencies: deps,
|
||||||
c_args: cflags,
|
c_args: common_c_flags,
|
||||||
|
link_with: libnm_systemd_logging_stub,
|
||||||
link_args: ldflags_linker_script_binary,
|
link_args: ldflags_linker_script_binary,
|
||||||
link_depends: linker_script_binary,
|
link_depends: linker_script_binary,
|
||||||
install: true,
|
install: true,
|
||||||
|
@@ -21,15 +21,20 @@ sources = files(
|
|||||||
'nmt-newt-widget.c',
|
'nmt-newt-widget.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
libnm_nm_default_dep,
|
||||||
|
newt_dep,
|
||||||
|
]
|
||||||
|
|
||||||
libnmt_newt = static_library(
|
libnmt_newt = static_library(
|
||||||
'nmt-newt',
|
'nmt-newt',
|
||||||
sources: sources + [libnm_enum[1]],
|
sources: sources,
|
||||||
include_directories: libnm_inc,
|
|
||||||
dependencies: deps,
|
dependencies: deps,
|
||||||
c_args: cflags,
|
c_args: common_c_flags,
|
||||||
)
|
)
|
||||||
|
|
||||||
libnmt_newt_dep = declare_dependency(
|
libnmt_newt_dep = declare_dependency(
|
||||||
include_directories: include_directories('.'),
|
include_directories: include_directories('.'),
|
||||||
|
dependencies: newt_dep,
|
||||||
link_with: libnmt_newt,
|
link_with: libnmt_newt,
|
||||||
)
|
)
|
||||||
|
@@ -6,32 +6,30 @@ data_conf.set('sysconfdir', nm_sysconfdir)
|
|||||||
data_conf.set('DISTRO_NETWORK_SERVICE', (enable_ifcfg_rh ? 'network.service' : ''))
|
data_conf.set('DISTRO_NETWORK_SERVICE', (enable_ifcfg_rh ? 'network.service' : ''))
|
||||||
data_conf.set('NM_MODIFY_SYSTEM_POLICY', (enable_modify_system ? 'yes' : 'auth_admin_keep'))
|
data_conf.set('NM_MODIFY_SYSTEM_POLICY', (enable_modify_system ? 'yes' : 'auth_admin_keep'))
|
||||||
|
|
||||||
server = 'server.conf'
|
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
input: server + '.in',
|
input: 'server.conf.in',
|
||||||
output: server,
|
output: '@BASENAME@',
|
||||||
install_dir: join_paths(nm_datadir, 'doc', nm_name, 'examples'),
|
install_dir: join_paths(nm_datadir, 'doc', nm_name, 'examples'),
|
||||||
configuration: data_conf,
|
configuration: data_conf,
|
||||||
)
|
)
|
||||||
|
|
||||||
if install_systemd_unit_dir
|
if install_systemdunitdir
|
||||||
services = [
|
services = [
|
||||||
'NetworkManager-dispatcher.service',
|
'NetworkManager-dispatcher.service.in',
|
||||||
'NetworkManager.service',
|
'NetworkManager.service.in',
|
||||||
]
|
]
|
||||||
|
|
||||||
if have_systemd_200
|
if have_systemd_200
|
||||||
services += ['NetworkManager-wait-online.service']
|
services += ['NetworkManager-wait-online.service.in']
|
||||||
else
|
else
|
||||||
services += ['NetworkManager-wait-online-systemd-pre200.service']
|
services += ['NetworkManager-wait-online-systemd-pre200.service.in']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
foreach service: services
|
foreach service: services
|
||||||
configure_file(
|
configure_file(
|
||||||
input: service + '.in',
|
input: service,
|
||||||
output: service,
|
output: '@BASENAME@',
|
||||||
install_dir: systemd_system_unit_dir,
|
install_dir: systemd_systemdsystemunitdir,
|
||||||
configuration: data_conf,
|
configuration: data_conf,
|
||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
@@ -39,12 +37,12 @@ if install_systemd_unit_dir
|
|||||||
if enable_ovs
|
if enable_ovs
|
||||||
install_data(
|
install_data(
|
||||||
'NetworkManager-ovs.conf',
|
'NetworkManager-ovs.conf',
|
||||||
install_dir: join_paths(systemd_system_unit_dir, 'NetworkManager.service.d'),
|
install_dir: join_paths(systemd_systemdsystemunitdir, 'NetworkManager.service.d'),
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if install_udev_dir
|
if install_udevdir
|
||||||
data = files(
|
data = files(
|
||||||
'84-nm-drivers.rules',
|
'84-nm-drivers.rules',
|
||||||
'85-nm-unmanaged.rules',
|
'85-nm-unmanaged.rules',
|
||||||
@@ -53,7 +51,7 @@ if install_udev_dir
|
|||||||
|
|
||||||
install_data(
|
install_data(
|
||||||
data,
|
data,
|
||||||
install_dir: join_paths(udev_dir, 'rules.d'),
|
install_dir: join_paths(udev_udevdir, 'rules.d'),
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -62,16 +60,16 @@ if enable_polkit
|
|||||||
|
|
||||||
policy_in = configure_file(
|
policy_in = configure_file(
|
||||||
input: policy + '.in.in',
|
input: policy + '.in.in',
|
||||||
output: policy + '.in',
|
output: '@BASENAME@',
|
||||||
configuration: data_conf,
|
configuration: data_conf,
|
||||||
)
|
)
|
||||||
|
|
||||||
custom_target(
|
custom_target(
|
||||||
policy,
|
policy,
|
||||||
input: policy_in,
|
input: policy_in,
|
||||||
output: policy,
|
output: '@BASENAME@',
|
||||||
command: intltool_xml_cmd,
|
command: intltool_xml_cmd,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: polkit_dir,
|
install_dir: polkit_gobject_policydir,
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
@@ -8,12 +8,10 @@ service_conf.set('sysconfdir', nm_sysconfdir)
|
|||||||
service_conf.set('localstatedir', nm_localstatedir)
|
service_conf.set('localstatedir', nm_localstatedir)
|
||||||
service_conf.set('libexecdir', nm_libexecdir)
|
service_conf.set('libexecdir', nm_libexecdir)
|
||||||
|
|
||||||
service = 'org.freedesktop.nm_dispatcher.service'
|
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
input: service + '.in',
|
input: 'org.freedesktop.nm_dispatcher.service.in',
|
||||||
output: service,
|
output: '@BASENAME@',
|
||||||
install_dir: dbus_sys_dir,
|
install_dir: dbus_system_bus_services_dir,
|
||||||
configuration: service_conf,
|
configuration: service_conf,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -22,27 +20,23 @@ install_data(
|
|||||||
install_dir: dbus_conf_dir,
|
install_dir: dbus_conf_dir,
|
||||||
)
|
)
|
||||||
|
|
||||||
sources = files('nm-dispatcher-utils.c')
|
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
libnm_dep,
|
libnm_dep,
|
||||||
libnm_core_dep,
|
libnm_nm_default_dep,
|
||||||
]
|
]
|
||||||
|
|
||||||
cflags = [
|
c_flags = [
|
||||||
'-DG_LOG_DOMAIN="@0@"'.format(name),
|
'-DG_LOG_DOMAIN="@0@"'.format(name),
|
||||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
|
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
|
||||||
]
|
]
|
||||||
|
|
||||||
libnm_dispatcher_core = static_library(
|
libnm_dispatcher_core = static_library(
|
||||||
name + '-core',
|
name + '-core',
|
||||||
sources: sources,
|
sources: 'nm-dispatcher-utils.c',
|
||||||
dependencies: deps,
|
dependencies: deps,
|
||||||
c_args: cflags,
|
c_args: c_flags,
|
||||||
)
|
)
|
||||||
|
|
||||||
sources = files('nm-dispatcher.c')
|
|
||||||
|
|
||||||
nmdbus_dispatcher_sources = gnome.gdbus_codegen(
|
nmdbus_dispatcher_sources = gnome.gdbus_codegen(
|
||||||
'nmdbus-dispatcher',
|
'nmdbus-dispatcher',
|
||||||
name + '.xml',
|
name + '.xml',
|
||||||
@@ -52,9 +46,9 @@ nmdbus_dispatcher_sources = gnome.gdbus_codegen(
|
|||||||
|
|
||||||
executable(
|
executable(
|
||||||
name,
|
name,
|
||||||
sources,
|
name + '.c',
|
||||||
dependencies: deps,
|
dependencies: deps,
|
||||||
c_args: cflags,
|
c_args: c_flags,
|
||||||
link_with: libnm_dispatcher_core,
|
link_with: libnm_dispatcher_core,
|
||||||
link_args: ldflags_linker_script_binary,
|
link_args: ldflags_linker_script_binary,
|
||||||
link_depends: linker_script_binary,
|
link_depends: linker_script_binary,
|
||||||
|
@@ -1,22 +1,21 @@
|
|||||||
test_unit = 'test-dispatcher-envp'
|
test_unit = 'test-dispatcher-envp'
|
||||||
|
|
||||||
incs = [
|
deps = [
|
||||||
dispatcher_inc,
|
libnm_nm_default_dep,
|
||||||
libnm_inc,
|
libnm_utils_base_dep,
|
||||||
|
]
|
||||||
|
|
||||||
|
c_flags = [
|
||||||
|
'-DNETWORKMANAGER_COMPILATION_TEST',
|
||||||
|
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
|
||||||
]
|
]
|
||||||
|
|
||||||
exe = executable(
|
exe = executable(
|
||||||
test_unit,
|
test_unit,
|
||||||
[ test_unit + '.c' ] + [ nmdbus_dispatcher_sources ],
|
[test_unit + '.c', nmdbus_dispatcher_sources],
|
||||||
include_directories: incs,
|
include_directories: dispatcher_inc,
|
||||||
dependencies: [
|
dependencies: deps,
|
||||||
libnm_core_dep,
|
c_args: c_flags,
|
||||||
libnm_dep,
|
|
||||||
],
|
|
||||||
c_args: [
|
|
||||||
'-DNETWORKMANAGER_COMPILATION_TEST',
|
|
||||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
|
|
||||||
],
|
|
||||||
link_with: libnm_dispatcher_core,
|
link_with: libnm_dispatcher_core,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -1,45 +1,52 @@
|
|||||||
doc_module = nm_name
|
|
||||||
|
|
||||||
settings = 'settings-spec'
|
|
||||||
output = settings + '.xml'
|
|
||||||
|
|
||||||
if enable_introspection
|
if enable_introspection
|
||||||
settings_xml = custom_target(
|
settings = 'settings-spec'
|
||||||
|
output = settings + '.xml'
|
||||||
|
|
||||||
|
inputs = [
|
||||||
|
settings + '.xsl',
|
||||||
|
nm_settings_docs,
|
||||||
|
]
|
||||||
|
|
||||||
|
content_files += custom_target(
|
||||||
output,
|
output,
|
||||||
input: nm_settings_docs,
|
input: inputs,
|
||||||
output: output,
|
output: output,
|
||||||
command: [xsltproc, '--output', '@OUTPUT@', join_paths(meson.current_source_dir(), settings + '.xsl'), '@INPUT@'],
|
command: [xsltproc, '--output', '@OUTPUT@', '@INPUT0@', '@INPUT1@'],
|
||||||
# FIXME: there is no target depending on this, so it will not be built
|
|
||||||
build_by_default: true,
|
build_by_default: true,
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
configure_file(
|
content_files += configure_file(
|
||||||
input: version_xml + '.in',
|
input: 'version.xml.in',
|
||||||
output: version_xml,
|
output: '@BASENAME@',
|
||||||
configuration: version_conf,
|
configuration: version_conf,
|
||||||
)
|
)
|
||||||
|
|
||||||
filecopier = find_program('cp')
|
filecopier = find_program('cp')
|
||||||
foreach intro : introspection_files
|
foreach intro: introspection_files
|
||||||
path = intro[1].split('/')[-1]
|
output = intro[1].split('/')[-1]
|
||||||
custom_target(path,
|
|
||||||
|
content_files += custom_target(
|
||||||
|
output,
|
||||||
input: intro[0],
|
input: intro[0],
|
||||||
output: path,
|
output: output,
|
||||||
command: [filecopier, intro[1], '@OUTPUT@'],
|
command: [filecopier, intro[1], '@OUTPUT@'],
|
||||||
build_by_default: true,
|
build_by_default: true,
|
||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
custom_target('common.ent',
|
output = 'common.ent'
|
||||||
|
|
||||||
|
content_files += custom_target(
|
||||||
|
output,
|
||||||
input: common_ent_file,
|
input: common_ent_file,
|
||||||
output: 'common.ent',
|
output: output,
|
||||||
command: [filecopier, '@INPUT@', '@OUTPUT@'],
|
command: [filecopier, '@INPUT@', '@OUTPUT@'],
|
||||||
build_by_default: true,
|
build_by_default: true,
|
||||||
)
|
)
|
||||||
|
|
||||||
gnome.gtkdoc(
|
gnome.gtkdoc(
|
||||||
doc_module,
|
nm_name,
|
||||||
main_xml: 'network-manager-docs.xml',
|
main_xml: 'network-manager-docs.xml',
|
||||||
src_dir: meson.current_source_dir(),
|
src_dir: meson.current_source_dir(),
|
||||||
content_files: content_files,
|
content_files: content_files,
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
doc_module = libnm_name
|
src_dirs = [
|
||||||
|
libnm_core_inc,
|
||||||
|
libnm_inc,
|
||||||
|
]
|
||||||
|
|
||||||
private_headers = [
|
private_headers = [
|
||||||
'common.h',
|
'common.h',
|
||||||
@@ -26,29 +29,29 @@ private_headers = [
|
|||||||
'test-general-enums.h',
|
'test-general-enums.h',
|
||||||
]
|
]
|
||||||
|
|
||||||
configure_file(
|
scan_args = [
|
||||||
input: version_xml + '.in',
|
|
||||||
output: version_xml,
|
|
||||||
configuration: version_conf,
|
|
||||||
)
|
|
||||||
|
|
||||||
gnome.gtkdoc(
|
|
||||||
doc_module,
|
|
||||||
main_xml: doc_module + '-docs.xml',
|
|
||||||
src_dir: [
|
|
||||||
libnm_core_inc,
|
|
||||||
libnm_inc,
|
|
||||||
],
|
|
||||||
dependencies: libnm_dep,
|
|
||||||
scan_args: [
|
|
||||||
'--rebuild-types',
|
'--rebuild-types',
|
||||||
'--rebuild-sections',
|
'--rebuild-sections',
|
||||||
'--ignore-decorators=NM_AVAILABLE_IN_\d_\d\d?|NM_DEPRECATED_IN_\d_\d\d?',
|
'--ignore-decorators=NM_AVAILABLE_IN_\d_\d\d?|NM_DEPRECATED_IN_\d_\d\d?',
|
||||||
'--ignore-headers=' + ' '.join(private_headers),
|
'--ignore-headers=' + ' '.join(private_headers),
|
||||||
],
|
]
|
||||||
|
|
||||||
|
version_xml = configure_file(
|
||||||
|
input: 'version.xml.in',
|
||||||
|
output: '@BASENAME@',
|
||||||
|
configuration: version_conf,
|
||||||
|
)
|
||||||
|
|
||||||
|
gnome.gtkdoc(
|
||||||
|
libnm_name,
|
||||||
|
main_xml: libnm_name + '-docs.xml',
|
||||||
|
src_dir: src_dirs,
|
||||||
|
dependencies: libnm_dep,
|
||||||
|
scan_args: scan_args,
|
||||||
scanobjs_args: '--type-init-func="g_type_init();"',
|
scanobjs_args: '--type-init-func="g_type_init();"',
|
||||||
fixxref_args: '--html-dir=' + join_paths(nm_prefix, gnome.gtkdoc_html_dir(doc_module)),
|
fixxref_args: '--html-dir=' + join_paths(nm_prefix, gnome.gtkdoc_html_dir(libnm_name)),
|
||||||
gobject_typesfile: doc_module + '.types',
|
gobject_typesfile: libnm_name + '.types',
|
||||||
html_assets: doc_module + '.png',
|
html_assets: 'libnm.png',
|
||||||
|
content_files: version_xml,
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
|
@@ -1,13 +1,11 @@
|
|||||||
version_conf = configuration_data()
|
version_conf = configuration_data()
|
||||||
version_conf.set('VERSION', nm_version)
|
version_conf.set('VERSION', nm_version)
|
||||||
|
|
||||||
version_xml = 'version.xml'
|
|
||||||
|
|
||||||
subdir('libnm')
|
subdir('libnm')
|
||||||
subdir('api')
|
subdir('api')
|
||||||
|
|
||||||
test(
|
test(
|
||||||
'check-docs',
|
'check-docs',
|
||||||
find_program(join_paths(meson.source_root(), 'tools', 'check-docs.sh')),
|
find_program(join_paths(source_root, 'tools', 'check-docs.sh')),
|
||||||
args: [meson.source_root(), meson.build_root()],
|
args: [source_root, build_root],
|
||||||
)
|
)
|
||||||
|
@@ -1,19 +1,18 @@
|
|||||||
examples = [
|
examples = [
|
||||||
['add-connection-gdbus', [libnm_enum[1]], [libnm_inc], [uuid_dep]],
|
['add-connection-gdbus', [libnm_enum_sources[1]], [uuid_dep]],
|
||||||
['add-connection-libnm', [], [], [libnm_dep]],
|
['add-connection-libnm', [], [libnm_dep]],
|
||||||
['get-active-connections-gdbus', [libnm_enum[1]], [libnm_inc], []],
|
['get-active-connections-gdbus', [libnm_enum_sources[1]], []],
|
||||||
['get-ap-info-libnm', [], [], [libnm_dep]],
|
['get-ap-info-libnm', [], [libnm_dep]],
|
||||||
['list-connections-gdbus', [], [], []],
|
['list-connections-gdbus', [], []],
|
||||||
['list-connections-libnm', [], [], [libnm_dep]],
|
['list-connections-libnm', [], [libnm_dep]],
|
||||||
['monitor-nm-running-gdbus', [], [], []],
|
['monitor-nm-running-gdbus', [], []],
|
||||||
['monitor-nm-state-gdbus', [], [], []],
|
['monitor-nm-state-gdbus', [], []],
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach example: examples
|
foreach example: examples
|
||||||
executable(
|
executable(
|
||||||
example[0],
|
example[0],
|
||||||
[example[0] + '.c'] + example[1],
|
[example[0] + '.c'] + example[1],
|
||||||
include_directories: example[2],
|
dependencies: [libnm_nm_default_dep] + example[2],
|
||||||
dependencies: [libnm_core_dep] + example[3],
|
|
||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
|
@@ -4,18 +4,11 @@ examples = [
|
|||||||
['change-ipv4-addresses', []],
|
['change-ipv4-addresses', []],
|
||||||
]
|
]
|
||||||
|
|
||||||
incs = [
|
|
||||||
top_inc,
|
|
||||||
libnm_core_inc,
|
|
||||||
]
|
|
||||||
|
|
||||||
qt_core_dep = dependency('QtCore', version: '>= 4')
|
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
dbus_dep,
|
dbus_dep,
|
||||||
qt_core_dep,
|
qt_core_dep,
|
||||||
dependency('QtDBus'),
|
qt_dbus_dep,
|
||||||
dependency('QtNetwork'),
|
qt_network_dep,
|
||||||
]
|
]
|
||||||
|
|
||||||
moc = find_program('moc-qt4', required: false)
|
moc = find_program('moc-qt4', required: false)
|
||||||
@@ -39,7 +32,7 @@ foreach example: examples
|
|||||||
executable(
|
executable(
|
||||||
example[0],
|
example[0],
|
||||||
example[0] + '.cpp',
|
example[0] + '.cpp',
|
||||||
include_directories: incs,
|
include_directories: libnm_core_inc,
|
||||||
dependencies: deps,
|
dependencies: deps,
|
||||||
link_depends: example[1],
|
link_depends: example[1],
|
||||||
)
|
)
|
||||||
|
@@ -76,7 +76,7 @@ foreach iface: ifaces
|
|||||||
if gio_unix_dep.version().version_compare('>= 2.51.3')
|
if gio_unix_dep.version().version_compare('>= 2.51.3')
|
||||||
dbus_iface_xml_path = join_paths(meson.current_build_dir(), 'dbus-' + iface_xml)
|
dbus_iface_xml_path = join_paths(meson.current_build_dir(), 'dbus-' + iface_xml)
|
||||||
else
|
else
|
||||||
dbus_iface_xml_path = join_paths(meson.build_root(), 'dbus-' + iface_xml)
|
dbus_iface_xml_path = join_paths(build_root, 'dbus-' + iface_xml)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
content_files += dbus_iface_xml_path
|
content_files += dbus_iface_xml_path
|
||||||
@@ -91,7 +91,7 @@ endforeach
|
|||||||
|
|
||||||
install_data(
|
install_data(
|
||||||
ifaces_xmls,
|
ifaces_xmls,
|
||||||
install_dir: dbus_ifaces_dir,
|
install_dir: dbus_interfaces_dir,
|
||||||
)
|
)
|
||||||
|
|
||||||
libnmdbus = static_library(
|
libnmdbus = static_library(
|
||||||
|
@@ -1,5 +1,16 @@
|
|||||||
libnm_core_inc = include_directories('.')
|
libnm_core_inc = include_directories('.')
|
||||||
|
|
||||||
|
libnm_core_nm_default_dep = declare_dependency(
|
||||||
|
sources: nm_version_macro_header,
|
||||||
|
include_directories: libnm_core_inc,
|
||||||
|
dependencies: glib_nm_default_dep,
|
||||||
|
)
|
||||||
|
|
||||||
|
common_c_flags = [
|
||||||
|
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
||||||
|
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE',
|
||||||
|
]
|
||||||
|
|
||||||
libnm_core_headers = files(
|
libnm_core_headers = files(
|
||||||
'nm-connection.h',
|
'nm-connection.h',
|
||||||
'nm-core-types.h',
|
'nm-core-types.h',
|
||||||
@@ -62,6 +73,42 @@ libnm_core_headers = files(
|
|||||||
'nm-vpn-plugin-info.h',
|
'nm-vpn-plugin-info.h',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
enum_types = 'nm-core-enum-types'
|
||||||
|
|
||||||
|
libnm_core_enum_sources = gnome.mkenums_simple(
|
||||||
|
enum_types,
|
||||||
|
sources: libnm_core_headers + [nm_version_macro_header],
|
||||||
|
identifier_prefix: nm_id_prefix,
|
||||||
|
install_header: true,
|
||||||
|
install_dir: libnm_pkgincludedir,
|
||||||
|
)
|
||||||
|
|
||||||
|
libnm_libnm_core_intern = static_library(
|
||||||
|
'nm-libnm-core-intern',
|
||||||
|
sources: nm_ethtool_utils_source + nm_libnm_core_utils_source + [libnm_core_enum_sources[1]],
|
||||||
|
dependencies: libnm_core_nm_default_dep,
|
||||||
|
c_args: common_c_flags,
|
||||||
|
)
|
||||||
|
|
||||||
|
libnm_libnm_core_intern_dep = declare_dependency(
|
||||||
|
sources: [libnm_core_enum_sources[1], nm_version_macro_header],
|
||||||
|
include_directories: [libnm_core_inc, shared_inc],
|
||||||
|
dependencies: libnm_utils_base_dep,
|
||||||
|
link_with: libnm_libnm_core_intern,
|
||||||
|
)
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
crypto_dep,
|
||||||
|
libnm_utils_base_dep,
|
||||||
|
]
|
||||||
|
|
||||||
|
libnm_crypto = static_library(
|
||||||
|
'nm-crypto',
|
||||||
|
sources: 'nm-crypto-@0@.c'.format(crypto),
|
||||||
|
dependencies: deps,
|
||||||
|
c_args: common_c_flags,
|
||||||
|
)
|
||||||
|
|
||||||
libnm_core_settings_sources = files(
|
libnm_core_settings_sources = files(
|
||||||
'nm-setting-6lowpan.c',
|
'nm-setting-6lowpan.c',
|
||||||
'nm-setting-8021x.c',
|
'nm-setting-8021x.c',
|
||||||
@@ -129,75 +176,16 @@ libnm_core_sources = libnm_core_settings_sources + files(
|
|||||||
'nm-vpn-plugin-info.c',
|
'nm-vpn-plugin-info.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
enum_headers = libnm_core_headers + [version_header]
|
|
||||||
enum_types = 'nm-core-enum-types'
|
|
||||||
|
|
||||||
libnm_core_enum = gnome.mkenums(
|
|
||||||
enum_types,
|
|
||||||
sources: enum_headers,
|
|
||||||
identifier_prefix: nm_id_prefix,
|
|
||||||
c_template: enum_types + '.c.template',
|
|
||||||
h_template: enum_types + '.h.template',
|
|
||||||
install_header: true,
|
|
||||||
install_dir: libnm_pkgincludedir,
|
|
||||||
)
|
|
||||||
|
|
||||||
libnm_core_enum_dep = declare_dependency(
|
|
||||||
sources: libnm_core_enum[1],
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
shared_nm_libnm_core_intern = static_library(
|
|
||||||
'nm-libnm-core-intern',
|
|
||||||
sources: files('../shared/nm-libnm-core-intern/nm-ethtool-utils.c',
|
|
||||||
'../shared/nm-libnm-core-intern/nm-libnm-core-utils.c'),
|
|
||||||
c_args: [
|
|
||||||
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
|
||||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE',
|
|
||||||
],
|
|
||||||
include_directories: [
|
|
||||||
top_inc,
|
|
||||||
shared_inc,
|
|
||||||
libnm_core_inc,
|
|
||||||
],
|
|
||||||
dependencies: [
|
|
||||||
glib_dep,
|
|
||||||
shared_c_siphash_dep,
|
|
||||||
shared_nm_glib_aux_dep,
|
|
||||||
libnm_core_enum_dep,
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
shared_nm_libnm_core_intern_dep = declare_dependency(
|
|
||||||
link_with: shared_nm_libnm_core_intern,
|
|
||||||
include_directories: [
|
|
||||||
top_inc,
|
|
||||||
shared_inc,
|
|
||||||
],
|
|
||||||
dependencies: [
|
|
||||||
glib_dep,
|
|
||||||
shared_nm_glib_aux_dep,
|
|
||||||
libnm_systemd_shared_dep,
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
dl_dep,
|
dl_dep,
|
||||||
libudev_dep,
|
libnm_systemd_shared_dep,
|
||||||
|
libnm_utils_base_dep,
|
||||||
uuid_dep,
|
uuid_dep,
|
||||||
glib_dep,
|
|
||||||
shared_c_siphash_dep,
|
|
||||||
shared_nm_glib_aux_dep,
|
|
||||||
shared_nm_udev_aux_dep,
|
|
||||||
shared_nm_libnm_core_intern_dep,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
cflags = [
|
links = [
|
||||||
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
libnm_crypto,
|
||||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE',
|
libnm_libnm_core_intern,
|
||||||
]
|
]
|
||||||
|
|
||||||
if enable_json_validation
|
if enable_json_validation
|
||||||
@@ -205,95 +193,43 @@ if enable_json_validation
|
|||||||
deps += jansson_dep
|
deps += jansson_dep
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (crypto_gnutls_dep.found())
|
|
||||||
libnm_crypto_gnutls = static_library(
|
|
||||||
'nm-crypto-gnutls',
|
|
||||||
sources: [ 'nm-crypto-gnutls.c' ],
|
|
||||||
dependencies: deps + [ crypto_gnutls_dep ],
|
|
||||||
c_args: cflags,
|
|
||||||
)
|
|
||||||
endif
|
|
||||||
|
|
||||||
if (crypto_nss_dep.found())
|
|
||||||
libnm_crypto_nss = static_library(
|
|
||||||
'nm-crypto-nss',
|
|
||||||
sources: [ 'nm-crypto-nss.c' ],
|
|
||||||
dependencies: deps + [ crypto_nss_dep ],
|
|
||||||
c_args: cflags,
|
|
||||||
)
|
|
||||||
endif
|
|
||||||
|
|
||||||
if crypto == 'gnutls'
|
|
||||||
libnm_crypto = libnm_crypto_gnutls
|
|
||||||
elif crypto == 'nss'
|
|
||||||
libnm_crypto = libnm_crypto_nss
|
|
||||||
else
|
|
||||||
error('bug')
|
|
||||||
endif
|
|
||||||
|
|
||||||
libnm_core_sources_all = libnm_core_sources
|
|
||||||
libnm_core_sources_all += libnm_core_enum
|
|
||||||
libnm_core_sources_all += shared_nm_meta_setting_c
|
|
||||||
libnm_core_sources_all += [version_header]
|
|
||||||
|
|
||||||
libnm_core = static_library(
|
libnm_core = static_library(
|
||||||
'nm-core',
|
'nm-core',
|
||||||
sources: libnm_core_sources_all,
|
sources: libnm_core_sources + libnm_core_enum_sources + nm_meta_setting_source + [nm_version_macro_header],
|
||||||
|
include_directories: top_inc,
|
||||||
dependencies: deps,
|
dependencies: deps,
|
||||||
link_with: libnm_crypto,
|
c_args: common_c_flags,
|
||||||
c_args: cflags,
|
link_with: links,
|
||||||
)
|
)
|
||||||
|
|
||||||
libnm_core_dep = declare_dependency(
|
libnm_core_dep = declare_dependency(
|
||||||
sources: libnm_core_enum[1],
|
sources: [libnm_core_enum_sources[1], nm_version_macro_header],
|
||||||
include_directories: libnm_core_inc,
|
include_directories: [libnm_core_inc, shared_inc],
|
||||||
dependencies: [
|
dependencies: glib_dep,
|
||||||
shared_nm_libnm_core_intern_dep,
|
link_with: libnm_core,
|
||||||
shared_nm_glib_aux_dep,
|
|
||||||
shared_c_siphash_dep,
|
|
||||||
libnm_systemd_shared_dep,
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
###############################################################################
|
c_flags = [
|
||||||
|
|
||||||
shared_nm_libnm_core_aux = static_library(
|
|
||||||
'nm-libnm-core-aux',
|
|
||||||
sources: files('../shared/nm-libnm-core-aux/nm-libnm-core-aux.c'),
|
|
||||||
c_args: [
|
|
||||||
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
||||||
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_WITH_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)',
|
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_WITH_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)',
|
||||||
],
|
]
|
||||||
include_directories: [
|
|
||||||
top_inc,
|
libnm_libnm_core_aux = static_library(
|
||||||
shared_inc,
|
'nm-libnm-core-aux',
|
||||||
libnm_core_inc,
|
sources: nm_libnm_core_aux_source + [libnm_core_enum_sources[1]],
|
||||||
],
|
dependencies: libnm_utils_base_dep,
|
||||||
dependencies: [
|
c_args: c_flags,
|
||||||
glib_dep,
|
link_with: libnm_libnm_core_intern,
|
||||||
shared_c_siphash_dep,
|
|
||||||
shared_nm_glib_aux_dep,
|
|
||||||
libnm_core_dep,
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
shared_nm_libnm_core_aux_dep = declare_dependency(
|
libnm_libnm_core_aux_dep = declare_dependency(
|
||||||
link_with: shared_nm_libnm_core_aux,
|
sources: [libnm_core_enum_sources[1], nm_version_macro_header],
|
||||||
include_directories: [
|
include_directories: [libnm_core_inc, shared_inc],
|
||||||
top_inc,
|
dependencies: glib_dep,
|
||||||
shared_inc,
|
link_with: libnm_libnm_core_aux,
|
||||||
],
|
|
||||||
dependencies: [
|
|
||||||
libnm_core_dep,
|
|
||||||
glib_dep,
|
|
||||||
shared_nm_glib_aux_dep,
|
|
||||||
libnm_systemd_shared_dep,
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
###############################################################################
|
enums_to_docbook = join_paths(source_root, 'tools', 'enums-to-docbook.pl')
|
||||||
|
|
||||||
enums_to_docbook = join_paths(meson.source_root(), 'tools', 'enums-to-docbook.pl')
|
|
||||||
|
|
||||||
docbooks = [
|
docbooks = [
|
||||||
['nm-dbus-types', 'nm-dbus-interface.h', 'NetworkManager D-Bus API Types'],
|
['nm-dbus-types', 'nm-dbus-interface.h', 'NetworkManager D-Bus API Types'],
|
||||||
@@ -317,8 +253,6 @@ foreach docbook: docbooks
|
|||||||
content_files += xml.full_path()
|
content_files += xml.full_path()
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
if enable_tests
|
if enable_tests
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
endif
|
endif
|
||||||
|
@@ -9,14 +9,24 @@
|
|||||||
|
|
||||||
enum_types = 'nm-core-tests-enum-types'
|
enum_types = 'nm-core-tests-enum-types'
|
||||||
|
|
||||||
enum = gnome.mkenums(
|
enum_sources = gnome.mkenums_simple(
|
||||||
enum_types,
|
enum_types,
|
||||||
sources: 'test-general-enums.h',
|
sources: 'test-general-enums.h',
|
||||||
identifier_prefix: nm_id_prefix,
|
identifier_prefix: nm_id_prefix,
|
||||||
c_template: enum_types + '.c.template',
|
|
||||||
h_template: enum_types + '.h.template',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
deps = [
|
||||||
|
libnm_core_dep,
|
||||||
|
libnm_core_nm_default_dep,
|
||||||
|
]
|
||||||
|
|
||||||
|
c_flags = [
|
||||||
|
'-DNETWORKMANAGER_COMPILATION_TEST',
|
||||||
|
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE',
|
||||||
|
]
|
||||||
|
|
||||||
|
test_cert_dir = join_paths(meson.current_source_dir(), 'certs')
|
||||||
|
|
||||||
test_units = [
|
test_units = [
|
||||||
'test-compare',
|
'test-compare',
|
||||||
'test-crypto',
|
'test-crypto',
|
||||||
@@ -27,22 +37,15 @@ test_units = [
|
|||||||
'test-settings-defaults',
|
'test-settings-defaults',
|
||||||
]
|
]
|
||||||
|
|
||||||
test_cert_dir = join_paths(meson.current_source_dir(), 'certs')
|
|
||||||
|
|
||||||
foreach test_unit: test_units
|
foreach test_unit: test_units
|
||||||
exe = executable(
|
exe = executable(
|
||||||
'libnm-core-' + test_unit,
|
'libnm-core-' + test_unit,
|
||||||
[test_unit + '.c'] + enum,
|
[test_unit + '.c'] + enum_sources,
|
||||||
dependencies: [
|
dependencies: deps,
|
||||||
libnm_core_dep,
|
c_args: c_flags,
|
||||||
libnm_systemd_shared_no_logging_dep,
|
link_with: libnm_systemd_logging_stub,
|
||||||
],
|
|
||||||
c_args: [
|
|
||||||
'-DNETWORKMANAGER_COMPILATION_TEST',
|
|
||||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE',
|
|
||||||
],
|
|
||||||
link_with: libnm_core,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
'libnm-core/' + test_unit,
|
'libnm-core/' + test_unit,
|
||||||
test_script,
|
test_script,
|
||||||
|
@@ -1,6 +1,12 @@
|
|||||||
libnm_inc = include_directories('.')
|
libnm_inc = include_directories('.')
|
||||||
|
|
||||||
cflags = [
|
libnm_nm_default_dep = declare_dependency(
|
||||||
|
sources: libnm_core_enum_sources[1],
|
||||||
|
include_directories: libnm_inc,
|
||||||
|
dependencies: libnm_core_nm_default_dep,
|
||||||
|
)
|
||||||
|
|
||||||
|
c_flags = [
|
||||||
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
||||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM',
|
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM',
|
||||||
]
|
]
|
||||||
@@ -55,16 +61,15 @@ libnm_headers = files(
|
|||||||
)
|
)
|
||||||
|
|
||||||
install_headers(
|
install_headers(
|
||||||
libnm_core_headers + libnm_headers + [version_header],
|
libnm_core_headers + libnm_headers + [nm_version_macro_header],
|
||||||
subdir: libnm_name,
|
subdir: libnm_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
enum_headers = libnm_headers + [version_header]
|
|
||||||
enum_types = 'nm-enum-types'
|
enum_types = 'nm-enum-types'
|
||||||
|
|
||||||
libnm_enum = gnome.mkenums(
|
libnm_enum_sources = gnome.mkenums(
|
||||||
enum_types,
|
enum_types,
|
||||||
sources: enum_headers,
|
sources: libnm_headers + [nm_version_macro_header],
|
||||||
identifier_prefix: nm_id_prefix,
|
identifier_prefix: nm_id_prefix,
|
||||||
c_template: enum_types + '.c.template',
|
c_template: enum_types + '.c.template',
|
||||||
h_template: enum_types + '.h.template',
|
h_template: enum_types + '.h.template',
|
||||||
@@ -127,65 +132,45 @@ libnm_sources = files(
|
|||||||
'nm-wimax-nsp.c',
|
'nm-wimax-nsp.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
linker_script = join_paths(meson.current_source_dir(), 'libnm.ver')
|
deps = [
|
||||||
|
libnmdbus_dep,
|
||||||
|
libnm_libnm_core_intern_dep,
|
||||||
|
libnm_nm_default_dep,
|
||||||
|
libnm_udev_aux_dep,
|
||||||
|
libudev_dep,
|
||||||
|
]
|
||||||
|
|
||||||
liblibnm = static_library(
|
liblibnm = static_library(
|
||||||
'libnm',
|
'libnm',
|
||||||
sources: libnm_sources + libnm_enum,
|
sources: libnm_sources + libnm_enum_sources,
|
||||||
include_directories: libnm_core_inc,
|
dependencies: deps,
|
||||||
dependencies: [
|
c_args: c_flags,
|
||||||
libnmdbus_dep,
|
link_with: libnm_systemd_logging_stub,
|
||||||
dl_dep,
|
|
||||||
libudev_dep,
|
|
||||||
shared_nm_glib_aux_dep,
|
|
||||||
libnm_core_dep,
|
|
||||||
uuid_dep,
|
|
||||||
libnm_systemd_shared_no_logging_dep,
|
|
||||||
],
|
|
||||||
c_args: cflags,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
liblibnm_dep = declare_dependency(
|
links = [
|
||||||
sources: libnm_enum[1],
|
liblibnm,
|
||||||
include_directories: [
|
libnm_core,
|
||||||
libnm_inc,
|
libnmdbus,
|
||||||
libnm_core_inc,
|
libnm_systemd_logging_stub,
|
||||||
],
|
libnm_utils_base,
|
||||||
dependencies: [
|
]
|
||||||
libnm_core_dep,
|
|
||||||
libnm_systemd_shared_no_logging_dep,
|
linker_script = join_paths(meson.current_source_dir(), 'libnm.ver')
|
||||||
libnmdbus_dep,
|
|
||||||
shared_nm_glib_aux_dep,
|
|
||||||
libudev_dep,
|
|
||||||
dl_dep,
|
|
||||||
uuid_dep,
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
libnm = shared_library(
|
libnm = shared_library(
|
||||||
'nm',
|
'nm',
|
||||||
version: libnm_version,
|
version: libnm_version,
|
||||||
link_whole: [
|
dependencies: libnm_nm_default_dep,
|
||||||
liblibnm,
|
link_whole: links,
|
||||||
libnm_core,
|
link_args: '-Wl,--version-script,@0@'.format(linker_script),
|
||||||
libnm_systemd_logging_stub,
|
|
||||||
libnmdbus,
|
|
||||||
shared_nm_glib_aux,
|
|
||||||
],
|
|
||||||
dependencies: liblibnm_dep,
|
|
||||||
link_args: [
|
|
||||||
'-Wl,--version-script,@0@'.format(linker_script),
|
|
||||||
],
|
|
||||||
link_depends: linker_script,
|
link_depends: linker_script,
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
|
|
||||||
libnm_dep = declare_dependency(
|
libnm_dep = declare_dependency(
|
||||||
sources: libnm_enum[1],
|
sources: libnm_enum_sources[1],
|
||||||
include_directories: [
|
include_directories: libnm_inc,
|
||||||
libnm_inc,
|
|
||||||
libnm_core_inc,
|
|
||||||
],
|
|
||||||
link_with: libnm,
|
link_with: libnm,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -210,21 +195,19 @@ test(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if enable_introspection
|
if enable_introspection
|
||||||
gir_sources = libnm_core_enum + libnm_core_headers + libnm_core_sources + libnm_enum + libnm_headers + libnm_sources + [version_header]
|
|
||||||
|
|
||||||
libnm_gir = gnome.generate_gir(
|
libnm_gir = gnome.generate_gir(
|
||||||
libnm,
|
libnm,
|
||||||
sources: gir_sources,
|
sources: libnm_core_sources + libnm_core_headers + libnm_core_enum_sources + libnm_sources + libnm_headers + libnm_enum_sources + [nm_version_macro_header],
|
||||||
|
includes: 'Gio-2.0',
|
||||||
nsversion: nm_gir_version,
|
nsversion: nm_gir_version,
|
||||||
namespace: 'NM',
|
namespace: 'NM',
|
||||||
identifier_prefix: nm_id_prefix,
|
identifier_prefix: nm_id_prefix,
|
||||||
symbol_prefix: nm_id_prefix.to_lower(),
|
symbol_prefix: nm_id_prefix.to_lower(),
|
||||||
export_packages: libnm_name,
|
|
||||||
includes: 'Gio-2.0',
|
|
||||||
extra_args: cflags,
|
|
||||||
header: 'NetworkManager.h',
|
header: 'NetworkManager.h',
|
||||||
|
export_packages: libnm_name,
|
||||||
|
extra_args: c_flags,
|
||||||
install: true,
|
install: true,
|
||||||
dependencies: libnm_dep,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
generate_plugin_docs = join_paths(meson.current_source_dir(), 'generate-plugin-docs.pl')
|
generate_plugin_docs = join_paths(meson.current_source_dir(), 'generate-plugin-docs.pl')
|
||||||
@@ -287,9 +270,9 @@ if enable_introspection
|
|||||||
name = 'nm-settings-docs.xml'
|
name = 'nm-settings-docs.xml'
|
||||||
nm_settings_docs = custom_target(
|
nm_settings_docs = custom_target(
|
||||||
name,
|
name,
|
||||||
input: libnm_gir[0],
|
input: [libnm_gir[0], nm_settings_docs_overrides],
|
||||||
output: name,
|
output: name,
|
||||||
command: [generate_setting_docs_env, python.path(), generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT@', '--overrides', nm_settings_docs_overrides, '--output', '@OUTPUT@'],
|
command: [generate_setting_docs_env, python.path(), generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT0@', '--overrides', '@INPUT1@', '--output', '@OUTPUT@'],
|
||||||
depends: libnm_gir,
|
depends: libnm_gir,
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
@@ -5,7 +5,12 @@ test_units = [
|
|||||||
['test-secret-agent', 90],
|
['test-secret-agent', 90],
|
||||||
]
|
]
|
||||||
|
|
||||||
cflags = [
|
deps = [
|
||||||
|
libnm_core_dep,
|
||||||
|
libnm_nm_default_dep,
|
||||||
|
]
|
||||||
|
|
||||||
|
c_flags = [
|
||||||
'-DNETWORKMANAGER_COMPILATION_TEST',
|
'-DNETWORKMANAGER_COMPILATION_TEST',
|
||||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM',
|
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM',
|
||||||
]
|
]
|
||||||
@@ -13,19 +18,10 @@ cflags = [
|
|||||||
foreach test_unit: test_units
|
foreach test_unit: test_units
|
||||||
exe = executable(
|
exe = executable(
|
||||||
test_unit[0],
|
test_unit[0],
|
||||||
[
|
[test_unit[0] + '.c', nm_test_utils_impl_source, libnm_enum_sources[1]],
|
||||||
test_unit[0] + '.c',
|
dependencies: deps,
|
||||||
shared_nm_test_utils_impl_c,
|
c_args: c_flags,
|
||||||
],
|
link_with: liblibnm,
|
||||||
dependencies: [
|
|
||||||
liblibnm_dep,
|
|
||||||
libnm_systemd_shared_no_logging_dep,
|
|
||||||
],
|
|
||||||
c_args: cflags,
|
|
||||||
link_with: [
|
|
||||||
liblibnm,
|
|
||||||
libnm_core,
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
@@ -39,8 +35,8 @@ endforeach
|
|||||||
# just test, that we can build "nm-vpn-plugin-utils.c"
|
# just test, that we can build "nm-vpn-plugin-utils.c"
|
||||||
libnm_vpn_plugin_utils_test = static_library(
|
libnm_vpn_plugin_utils_test = static_library(
|
||||||
'nm-vpn-plugin-utils-test',
|
'nm-vpn-plugin-utils-test',
|
||||||
sources: shared_nm_utils_nm_vpn_plugin_utils_c + [libnm_enum[1]],
|
sources: nm_vpn_plugin_utils_source + [libnm_enum_sources[1]],
|
||||||
include_directories: libnm_inc,
|
include_directories: libnm_inc,
|
||||||
dependencies: libnm_core_dep,
|
dependencies: libnm_nm_default_dep,
|
||||||
c_args: cflags,
|
c_args: c_flags,
|
||||||
)
|
)
|
||||||
|
@@ -9,11 +9,9 @@ common_conf.set('NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT', config_default_logging_a
|
|||||||
common_conf.set('NM_CONFIG_DEFAULT_MAIN_RC_MANAGER', config_dns_rc_manager_default)
|
common_conf.set('NM_CONFIG_DEFAULT_MAIN_RC_MANAGER', config_dns_rc_manager_default)
|
||||||
common_conf.set('NM_CONFIG_DEFAULT_MAIN_DHCP', config_dhcp_default)
|
common_conf.set('NM_CONFIG_DEFAULT_MAIN_DHCP', config_dhcp_default)
|
||||||
|
|
||||||
common = 'common.ent'
|
|
||||||
|
|
||||||
common_ent_file = configure_file(
|
common_ent_file = configure_file(
|
||||||
input: common + '.in',
|
input: 'common.ent.in',
|
||||||
output: common,
|
output: '@BASENAME@',
|
||||||
configuration: common_conf,
|
configuration: common_conf,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
137
meson.build
137
meson.build
@@ -65,6 +65,27 @@ libnm_pkgincludedir = join_paths(nm_includedir, libnm_name)
|
|||||||
|
|
||||||
nm_debug = get_option('buildtype').contains('debug')
|
nm_debug = get_option('buildtype').contains('debug')
|
||||||
|
|
||||||
|
gnome = import('gnome')
|
||||||
|
i18n = import('i18n')
|
||||||
|
pkg = import('pkgconfig')
|
||||||
|
|
||||||
|
source_root = meson.current_source_dir()
|
||||||
|
build_root = meson.current_build_dir()
|
||||||
|
|
||||||
|
po_dir = join_paths(meson.source_root(), 'po')
|
||||||
|
|
||||||
|
intltool_merge = find_program('intltool-merge')
|
||||||
|
intltool_cache = join_paths(po_dir, '.intltool-merge-cache')
|
||||||
|
intltool_desktop_cmd = [intltool_merge, '-d', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
|
||||||
|
intltool_xml_cmd = [intltool_merge, '-x', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
|
||||||
|
|
||||||
|
top_inc = include_directories('.')
|
||||||
|
|
||||||
|
perl = find_program('perl')
|
||||||
|
xsltproc = find_program('xsltproc')
|
||||||
|
|
||||||
|
check_exports = find_program(join_paths(source_root, 'tools', 'check-exports.sh'))
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
|
|
||||||
config_h = configuration_data()
|
config_h = configuration_data()
|
||||||
@@ -116,18 +137,18 @@ common_ldflags = []
|
|||||||
|
|
||||||
enable_ld_gc = get_option('ld_gc')
|
enable_ld_gc = get_option('ld_gc')
|
||||||
if enable_ld_gc
|
if enable_ld_gc
|
||||||
test_cflags = [
|
test_c_flags = [
|
||||||
'-fdata-sections',
|
'-fdata-sections',
|
||||||
'-ffunction-sections',
|
'-ffunction-sections',
|
||||||
]
|
]
|
||||||
|
|
||||||
test_ldflags = ['-Wl,--gc-sections']
|
test_ldflags = ['-Wl,--gc-sections']
|
||||||
|
|
||||||
foreach cflag: test_cflags + test_ldflags
|
foreach cflag: test_c_flags + test_ldflags
|
||||||
assert(cc.has_argument(cflag), 'Unused symbol eviction requested but not supported. Use -Dld_gc=false to build without it.')
|
assert(cc.has_argument(cflag), 'Unused symbol eviction requested but not supported. Use -Dld_gc=false to build without it.')
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
common_flags += test_cflags
|
common_flags += test_c_flags
|
||||||
common_ldflags += test_ldflags
|
common_ldflags += test_ldflags
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -172,9 +193,9 @@ endif
|
|||||||
add_project_arguments(common_flags, language: 'c')
|
add_project_arguments(common_flags, language: 'c')
|
||||||
add_project_link_arguments(common_ldflags, language: 'c')
|
add_project_link_arguments(common_ldflags, language: 'c')
|
||||||
|
|
||||||
linker_script_binary = join_paths(meson.source_root(), 'linker-script-binary.ver')
|
linker_script_binary = join_paths(source_root, 'linker-script-binary.ver')
|
||||||
linker_script_devices = join_paths(meson.source_root(), 'linker-script-devices.ver')
|
linker_script_devices = join_paths(source_root, 'linker-script-devices.ver')
|
||||||
linker_script_settings = join_paths(meson.source_root(), 'linker-script-settings.ver')
|
linker_script_settings = join_paths(source_root, 'linker-script-settings.ver')
|
||||||
|
|
||||||
ldflags_linker_script_binary = [ '-Wl,--version-script,@0@'.format(linker_script_binary) ]
|
ldflags_linker_script_binary = [ '-Wl,--version-script,@0@'.format(linker_script_binary) ]
|
||||||
ldflags_linker_script_devices = [ '-Wl,--version-script,@0@'.format(linker_script_devices) ]
|
ldflags_linker_script_devices = [ '-Wl,--version-script,@0@'.format(linker_script_devices) ]
|
||||||
@@ -259,9 +280,7 @@ config_h.set_quoted('NM_DIST_VERSION', dist_version)
|
|||||||
enable_wifi = get_option('wifi')
|
enable_wifi = get_option('wifi')
|
||||||
|
|
||||||
enable_iwd = get_option('iwd')
|
enable_iwd = get_option('iwd')
|
||||||
if enable_iwd
|
assert((not enable_iwd) or enable_wifi, 'Enabling iwd support requires Wi-Fi support as well')
|
||||||
assert(enable_wifi, 'Enabling iwd support requires Wi-Fi support as well')
|
|
||||||
endif
|
|
||||||
config_h.set10('WITH_IWD', enable_iwd)
|
config_h.set10('WITH_IWD', enable_iwd)
|
||||||
|
|
||||||
enable_wext = get_option('wext')
|
enable_wext = get_option('wext')
|
||||||
@@ -295,19 +314,19 @@ if enable_introspection
|
|||||||
assert(gir_dep.found(), 'introspection support was requested, but the gobject-introspection library is not available. Use -Dintrospection=false to build without it.')
|
assert(gir_dep.found(), 'introspection support was requested, but the gobject-introspection library is not available. Use -Dintrospection=false to build without it.')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
udev_dir = get_option('udev_dir')
|
udev_udevdir = get_option('udev_dir')
|
||||||
install_udev_dir = (udev_dir != 'no')
|
install_udevdir = (udev_udevdir != 'no')
|
||||||
|
|
||||||
if install_udev_dir and udev_dir == ''
|
if install_udevdir and udev_udevdir == ''
|
||||||
udev_dir = dependency('udev').get_pkgconfig_variable('udevdir')
|
udev_udevdir = dependency('udev').get_pkgconfig_variable('udevdir')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
systemd_system_unit_dir = get_option('systemdsystemunitdir')
|
systemd_systemdsystemunitdir = get_option('systemdsystemunitdir')
|
||||||
install_systemd_unit_dir = (systemd_system_unit_dir != 'no')
|
install_systemdunitdir = (systemd_systemdsystemunitdir != 'no')
|
||||||
|
|
||||||
if install_systemd_unit_dir and systemd_system_unit_dir == ''
|
if install_systemdunitdir and systemd_systemdsystemunitdir == ''
|
||||||
assert(systemd_dep.found(), 'systemd required but not found, please provide a valid systemd user unit dir or disable it')
|
assert(systemd_dep.found(), 'systemd required but not found, please provide a valid systemd user unit dir or disable it')
|
||||||
systemd_system_unit_dir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
|
systemd_systemdsystemunitdir = systemd_dep.get_pkgconfig_variable('systemdsystemunitdir')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
enable_systemd_journal = get_option('systemd_journal')
|
enable_systemd_journal = get_option('systemd_journal')
|
||||||
@@ -442,7 +461,7 @@ config_h.set10('WITH_JSON_VALIDATION', enable_json_validation)
|
|||||||
enable_polkit = get_option('polkit')
|
enable_polkit = get_option('polkit')
|
||||||
if enable_polkit
|
if enable_polkit
|
||||||
# FIXME: policydir should be relative to `datadir`, not `prefix`. Fixed in https://gitlab.freedesktop.org/polkit/polkit/merge_requests/2
|
# FIXME: policydir should be relative to `datadir`, not `prefix`. Fixed in https://gitlab.freedesktop.org/polkit/polkit/merge_requests/2
|
||||||
polkit_dir = dependency('polkit-gobject-1').get_pkgconfig_variable('policydir', define_variable: ['prefix', nm_prefix])
|
polkit_gobject_policydir = dependency('polkit-gobject-1').get_pkgconfig_variable('policydir', define_variable: ['prefix', nm_prefix])
|
||||||
endif
|
endif
|
||||||
|
|
||||||
config_default_main_auth_polkit = enable_polkit.to_string()
|
config_default_main_auth_polkit = enable_polkit.to_string()
|
||||||
@@ -456,14 +475,18 @@ if enable_polkit_agent
|
|||||||
endif
|
endif
|
||||||
config_h.set10('WITH_POLKIT_AGENT', enable_polkit_agent)
|
config_h.set10('WITH_POLKIT_AGENT', enable_polkit_agent)
|
||||||
|
|
||||||
crypto_gnutls_dep = dependency('gnutls', version: '>= 2.12', required: false)
|
|
||||||
crypto_nss_dep = dependency('nss', required: false)
|
|
||||||
|
|
||||||
crypto = get_option('crypto')
|
crypto = get_option('crypto')
|
||||||
if crypto == 'nss'
|
if crypto == 'nss'
|
||||||
assert(crypto_nss_dep.found(), 'Requires gnutls crypto support')
|
crypto_dep = dependency('nss', required: false)
|
||||||
|
assert(crypto_dep.found(), 'Requires nss crypto support')
|
||||||
elif crypto == 'gnutls'
|
elif crypto == 'gnutls'
|
||||||
assert(crypto_gnutls_dep.found(), 'Requires gnutls crypto support')
|
crypto_dep = dependency(
|
||||||
|
'gnutls',
|
||||||
|
version: '>= 2.12',
|
||||||
|
required: false,
|
||||||
|
)
|
||||||
|
assert(crypto_dep.found(), 'Requires gnutls crypto support')
|
||||||
else
|
else
|
||||||
error('bug')
|
error('bug')
|
||||||
endif
|
endif
|
||||||
@@ -471,11 +494,11 @@ endif
|
|||||||
dbus_conf_dir = get_option('dbus_conf_dir')
|
dbus_conf_dir = get_option('dbus_conf_dir')
|
||||||
if dbus_conf_dir == ''
|
if dbus_conf_dir == ''
|
||||||
assert(dbus_dep.found(), 'D-Bus required but not found, please provide a valid system bus config dir')
|
assert(dbus_dep.found(), 'D-Bus required but not found, please provide a valid system bus config dir')
|
||||||
dbus_conf_dir = join_paths(dbus_dep.get_pkgconfig_variable('sysconfdir'), 'dbus-1', 'system.d')
|
dbus_conf_dir = join_paths(dbus_dep.get_pkgconfig_variable('sysconfdir', define_variable: ['sysconfdir', nm_sysconfdir]), 'dbus-1', 'system.d')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
dbus_ifaces_dir = dbus_dep.get_pkgconfig_variable('interfaces_dir', define_variable: ['datadir', nm_datadir])
|
dbus_interfaces_dir = dbus_dep.get_pkgconfig_variable('interfaces_dir', define_variable: ['datadir', nm_datadir])
|
||||||
dbus_sys_dir = dbus_dep.get_pkgconfig_variable('system_bus_services_dir', define_variable: ['datadir', nm_datadir])
|
dbus_system_bus_services_dir = dbus_dep.get_pkgconfig_variable('system_bus_services_dir', define_variable: ['datadir', nm_datadir])
|
||||||
|
|
||||||
# pppd
|
# pppd
|
||||||
enable_ppp = get_option('ppp')
|
enable_ppp = get_option('ppp')
|
||||||
@@ -503,8 +526,8 @@ enable_modem_manager = get_option('modem_manager')
|
|||||||
if enable_modem_manager
|
if enable_modem_manager
|
||||||
mm_glib_dep = dependency('mm-glib', version: '>= 0.7.991')
|
mm_glib_dep = dependency('mm-glib', version: '>= 0.7.991')
|
||||||
|
|
||||||
service_provider_db = dependency('mobile-broadband-provider-info').get_pkgconfig_variable('database')
|
mobile_broadband_provider_info_database = dependency('mobile-broadband-provider-info').get_pkgconfig_variable('database')
|
||||||
config_h.set_quoted('MOBILE_BROADBAND_PROVIDER_INFO_DATABASE', service_provider_db)
|
config_h.set_quoted('MOBILE_BROADBAND_PROVIDER_INFO_DATABASE', mobile_broadband_provider_info_database)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Bluez5 DUN support
|
# Bluez5 DUN support
|
||||||
@@ -718,7 +741,7 @@ endif
|
|||||||
tests = get_option('tests')
|
tests = get_option('tests')
|
||||||
enable_tests = (tests != 'no')
|
enable_tests = (tests != 'no')
|
||||||
require_root_tests = (tests == 'root')
|
require_root_tests = (tests == 'root')
|
||||||
test_script = find_program(join_paths(meson.source_root(), 'tools', 'run-nm-test.sh'))
|
test_script = find_program(join_paths(source_root, 'tools', 'run-nm-test.sh'))
|
||||||
|
|
||||||
# valgrind
|
# valgrind
|
||||||
locations = get_option('valgrind')
|
locations = get_option('valgrind')
|
||||||
@@ -731,13 +754,13 @@ endif
|
|||||||
if enable_valgrind
|
if enable_valgrind
|
||||||
valgrind_suppressions_path = get_option('valgrind_suppressions')
|
valgrind_suppressions_path = get_option('valgrind_suppressions')
|
||||||
if valgrind_suppressions_path == ''
|
if valgrind_suppressions_path == ''
|
||||||
valgrind_suppressions_path = join_paths(meson.source_root(), 'valgrind.suppressions')
|
valgrind_suppressions_path = join_paths(source_root, 'valgrind.suppressions')
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
test_args = [
|
test_args = [
|
||||||
'--called-from-make',
|
'--called-from-make',
|
||||||
meson.build_root(),
|
build_root,
|
||||||
'',
|
'',
|
||||||
enable_valgrind ? valgrind.path() : '',
|
enable_valgrind ? valgrind.path() : '',
|
||||||
enable_valgrind ? valgrind_suppressions_path : '',
|
enable_valgrind ? valgrind_suppressions_path : '',
|
||||||
@@ -783,39 +806,8 @@ else
|
|||||||
fi
|
fi
|
||||||
'''
|
'''
|
||||||
|
|
||||||
gnome = import('gnome')
|
|
||||||
i18n = import('i18n')
|
|
||||||
pkg = import('pkgconfig')
|
|
||||||
|
|
||||||
po_dir = join_paths(meson.source_root(), 'po')
|
|
||||||
|
|
||||||
intltool_merge = find_program('intltool-merge')
|
|
||||||
intltool_cache = join_paths(po_dir, '.intltool-merge-cache')
|
|
||||||
intltool_desktop_cmd = [intltool_merge, '-d', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
|
|
||||||
intltool_xml_cmd = [intltool_merge, '-x', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
|
|
||||||
|
|
||||||
perl = find_program('perl')
|
|
||||||
xsltproc = find_program('xsltproc')
|
|
||||||
|
|
||||||
check_exports = find_program(join_paths(meson.source_root(), 'tools', 'check-exports.sh'))
|
|
||||||
|
|
||||||
content_files = []
|
content_files = []
|
||||||
|
|
||||||
# FIXME: every plugin calls to this:
|
|
||||||
'''
|
|
||||||
set_sanitizer_env = \
|
|
||||||
[ -n "$(SANITIZER_ENV)" ] && export $(SANITIZER_ENV) ; \
|
|
||||||
if [ -n "$(1)" ] && echo $(CFLAGS) | grep -e -fsanitize=address ; then \
|
|
||||||
export LD_PRELOAD="$${LD_PRELOAD}:$$(ldd $(1) | grep libasan\.so\.. -o | head -n 1)"; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
check_so_symbols = \
|
|
||||||
$(call set_sanitizer_env,$(1)); \
|
|
||||||
LD_BIND_NOW=1 LD_PRELOAD=$${LD_PRELOAD}:$(1) $(builddir)/src/NetworkManager --version >/dev/null
|
|
||||||
'''
|
|
||||||
|
|
||||||
top_inc = include_directories('.')
|
|
||||||
|
|
||||||
subdir('introspection')
|
subdir('introspection')
|
||||||
subdir('shared')
|
subdir('shared')
|
||||||
subdir('libnm-core')
|
subdir('libnm-core')
|
||||||
@@ -835,6 +827,11 @@ subdir('examples/C/glib')
|
|||||||
enable_qt = get_option('qt')
|
enable_qt = get_option('qt')
|
||||||
if enable_qt
|
if enable_qt
|
||||||
add_languages('cpp')
|
add_languages('cpp')
|
||||||
|
|
||||||
|
qt_core_dep = dependency('QtCore', version: '>= 4')
|
||||||
|
qt_dbus_dep = dependency('QtDBus')
|
||||||
|
qt_network_dep = dependency('QtNetwork')
|
||||||
|
|
||||||
subdir('examples/C/qt')
|
subdir('examples/C/qt')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -847,11 +844,9 @@ if enable_docs
|
|||||||
subdir('docs')
|
subdir('docs')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
config = 'config.h'
|
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
input: config + '.meson',
|
input: 'config.h.meson',
|
||||||
output: config,
|
output: '@BASENAME@',
|
||||||
configuration: config_h,
|
configuration: config_h,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -868,8 +863,8 @@ config_extra_h.set_quoted('NMPLUGINDIR', nm_plugindir)
|
|||||||
config_extra_h.set_quoted('NMRUNDIR', nm_pkgrundir)
|
config_extra_h.set_quoted('NMRUNDIR', nm_pkgrundir)
|
||||||
config_extra_h.set_quoted('NMSTATEDIR', nm_pkgstatedir)
|
config_extra_h.set_quoted('NMSTATEDIR', nm_pkgstatedir)
|
||||||
config_extra_h.set_quoted('NMVPNDIR', nm_vpndir)
|
config_extra_h.set_quoted('NMVPNDIR', nm_vpndir)
|
||||||
config_extra_h.set_quoted('NM_BUILD_BUILDDIR', meson.build_root())
|
config_extra_h.set_quoted('NM_BUILD_BUILDDIR', build_root)
|
||||||
config_extra_h.set_quoted('NM_BUILD_SRCDIR', meson.source_root())
|
config_extra_h.set_quoted('NM_BUILD_SRCDIR', source_root)
|
||||||
if enable_ppp
|
if enable_ppp
|
||||||
config_extra_h.set_quoted('PPPD_PLUGIN_DIR', pppd_plugin_dir)
|
config_extra_h.set_quoted('PPPD_PLUGIN_DIR', pppd_plugin_dir)
|
||||||
endif
|
endif
|
||||||
@@ -879,7 +874,7 @@ config_extra_h.set_quoted('SYSCONFDIR', nm_sysconfdir)
|
|||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'config-extra.h.meson',
|
input: 'config-extra.h.meson',
|
||||||
output: 'config-extra.h',
|
output: '@BASENAME@',
|
||||||
configuration: config_extra_h,
|
configuration: config_extra_h,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -892,12 +887,14 @@ meson.add_install_script(
|
|||||||
nm_pkgstatedir,
|
nm_pkgstatedir,
|
||||||
enable_docs ? 'install_docs' : '',
|
enable_docs ? 'install_docs' : '',
|
||||||
nm_mandir,
|
nm_mandir,
|
||||||
|
enable_ifcfg_rh ? 'create_network_scripts' : '',
|
||||||
|
nm_sysconfdir,
|
||||||
)
|
)
|
||||||
|
|
||||||
output = '\nSystem paths:\n'
|
output = '\nSystem paths:\n'
|
||||||
output += ' prefix: ' + nm_prefix + '\n'
|
output += ' prefix: ' + nm_prefix + '\n'
|
||||||
output += ' exec_prefix: ' + nm_prefix + '\n'
|
output += ' exec_prefix: ' + nm_prefix + '\n'
|
||||||
output += ' systemdunitdir: ' + systemd_system_unit_dir + '\n'
|
output += ' systemdunitdir: ' + systemd_systemdsystemunitdir + '\n'
|
||||||
output += ' nmbinary: ' + nm_pkgsbindir + '\n'
|
output += ' nmbinary: ' + nm_pkgsbindir + '\n'
|
||||||
output += ' nmconfdir: ' + nm_pkgconfdir + '\n'
|
output += ' nmconfdir: ' + nm_pkgconfdir + '\n'
|
||||||
output += ' nmlibdir: ' + nm_pkglibdir + '\n'
|
output += ' nmlibdir: ' + nm_pkglibdir + '\n'
|
||||||
@@ -962,7 +959,7 @@ output += ' code coverage: ' + get_option('b_coverage').to_string() + '\n'
|
|||||||
output += ' LTO: ' + enable_lto.to_string() + '\n'
|
output += ' LTO: ' + enable_lto.to_string() + '\n'
|
||||||
output += ' Linker garbage collection: ' + enable_ld_gc.to_string() + '\n'
|
output += ' Linker garbage collection: ' + enable_ld_gc.to_string() + '\n'
|
||||||
output += ' JSON validation for libnm: ' + enable_json_validation.to_string() + '\n'
|
output += ' JSON validation for libnm: ' + enable_json_validation.to_string() + '\n'
|
||||||
output += ' crypto: ' + crypto + ' (have-gnutls: ' + crypto_gnutls_dep.found().to_string() + ', have-nss: ' + crypto_nss_dep.found().to_string() + ')\n'
|
output += ' crypto: ' + crypto + '\n'
|
||||||
output += ' sanitizers: ' + get_option('b_sanitize') + '\n'
|
output += ' sanitizers: ' + get_option('b_sanitize') + '\n'
|
||||||
output += ' Mozilla Public Suffix List: ' + enable_libpsl.to_string() + '\n'
|
output += ' Mozilla Public Suffix List: ' + enable_libpsl.to_string() + '\n'
|
||||||
output += ' vapi: ' + enable_vapi.to_string() + '\n'
|
output += ' vapi: ' + enable_vapi.to_string() + '\n'
|
||||||
|
@@ -1,182 +1,140 @@
|
|||||||
shared_inc = include_directories('.')
|
shared_inc = include_directories('.')
|
||||||
|
|
||||||
###############################################################################
|
nm_default_dep = declare_dependency(include_directories: [top_inc, shared_inc])
|
||||||
|
|
||||||
shared_c_stdaux = static_library(
|
glib_nm_default_dep = declare_dependency(dependencies: [glib_dep, nm_default_dep])
|
||||||
'c-stdaux',
|
|
||||||
c_args: '-std=c11',
|
|
||||||
sources: files('c-stdaux/src/c-stdaux.h'),
|
|
||||||
)
|
|
||||||
|
|
||||||
shared_c_stdaux_dep = declare_dependency(
|
libc_siphash = static_library(
|
||||||
include_directories: shared_inc,
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
shared_c_siphash = static_library(
|
|
||||||
'c-siphash',
|
'c-siphash',
|
||||||
include_directories: [
|
|
||||||
include_directories('c-stdaux/src'),
|
|
||||||
],
|
|
||||||
sources: 'c-siphash/src/c-siphash.c',
|
sources: 'c-siphash/src/c-siphash.c',
|
||||||
|
include_directories: include_directories('c-stdaux/src'),
|
||||||
)
|
)
|
||||||
|
|
||||||
shared_c_siphash_dep = declare_dependency(
|
libc_rbtree = static_library(
|
||||||
include_directories: shared_inc,
|
|
||||||
link_with: shared_c_siphash,
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
shared_c_rbtree = static_library(
|
|
||||||
'c-rbtree',
|
'c-rbtree',
|
||||||
|
sources: 'c-rbtree/src/c-rbtree.c',
|
||||||
|
include_directories: include_directories('c-stdaux/src'),
|
||||||
c_args: '-std=c11',
|
c_args: '-std=c11',
|
||||||
include_directories: [
|
|
||||||
include_directories('c-stdaux/src'),
|
|
||||||
],
|
|
||||||
sources: files('c-rbtree/src/c-rbtree.c',
|
|
||||||
'c-rbtree/src/c-rbtree.h',
|
|
||||||
'c-rbtree/src/c-rbtree-private.h'),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
shared_c_rbtree_dep = declare_dependency(
|
sources = files(
|
||||||
include_directories: shared_inc,
|
'n-acd/src/n-acd.c',
|
||||||
link_with: shared_c_rbtree,
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
if enable_ebpf
|
|
||||||
shared_n_acd_bpf_files = files('n-acd/src/n-acd-bpf.c')
|
|
||||||
else
|
|
||||||
shared_n_acd_bpf_files = files('n-acd/src/n-acd-bpf-fallback.c')
|
|
||||||
endif
|
|
||||||
|
|
||||||
shared_n_acd = static_library(
|
|
||||||
'n-acd',
|
|
||||||
sources: files('n-acd/src/n-acd.c',
|
|
||||||
'n-acd/src/n-acd.h',
|
|
||||||
'n-acd/src/n-acd-private.h',
|
|
||||||
'n-acd/src/n-acd-probe.c',
|
'n-acd/src/n-acd-probe.c',
|
||||||
'n-acd/src/util/timer.c',
|
'n-acd/src/util/timer.c',
|
||||||
'n-acd/src/util/timer.h')
|
)
|
||||||
+ shared_n_acd_bpf_files,
|
|
||||||
c_args: [
|
if enable_ebpf
|
||||||
|
sources += files('n-acd/src/n-acd-bpf.c')
|
||||||
|
else
|
||||||
|
sources += files('n-acd/src/n-acd-bpf-fallback.c')
|
||||||
|
endif
|
||||||
|
|
||||||
|
incs = include_directories(
|
||||||
|
'c-list/src',
|
||||||
|
'c-rbtree/src',
|
||||||
|
'c-siphash/src',
|
||||||
|
'c-stdaux/src',
|
||||||
|
)
|
||||||
|
|
||||||
|
c_flags = [
|
||||||
'-D_GNU_SOURCE',
|
'-D_GNU_SOURCE',
|
||||||
'-DSO_ATTACH_BPF=50',
|
'-DSO_ATTACH_BPF=50',
|
||||||
'-std=c11',
|
'-std=c11',
|
||||||
'-Wno-pointer-arith',
|
'-Wno-pointer-arith',
|
||||||
'-Wno-vla',
|
'-Wno-vla',
|
||||||
],
|
]
|
||||||
include_directories: [
|
|
||||||
include_directories('c-stdaux/src'),
|
links = [
|
||||||
include_directories('c-siphash/src'),
|
libc_rbtree,
|
||||||
include_directories('c-list/src'),
|
libc_siphash,
|
||||||
include_directories('c-rbtree/src'),
|
]
|
||||||
],
|
|
||||||
dependencies: [
|
libn_acd = static_library(
|
||||||
shared_c_siphash_dep,
|
'n-acd',
|
||||||
shared_c_rbtree_dep,
|
sources: sources,
|
||||||
],
|
include_directories: incs,
|
||||||
|
c_args: c_flags,
|
||||||
|
link_with: links,
|
||||||
)
|
)
|
||||||
|
|
||||||
shared_n_acd_dep = declare_dependency(
|
libn_acd_dep = declare_dependency(
|
||||||
include_directories: shared_inc,
|
include_directories: shared_inc,
|
||||||
link_with: shared_n_acd,
|
link_with: libn_acd,
|
||||||
)
|
)
|
||||||
|
|
||||||
###############################################################################
|
sources = files(
|
||||||
|
'n-dhcp4/src/n-dhcp4-c-connection.c',
|
||||||
shared_n_dhcp4 = static_library(
|
|
||||||
'n-dhcp4',
|
|
||||||
sources: files('n-dhcp4/src/n-dhcp4-c-connection.c',
|
|
||||||
'n-dhcp4/src/n-dhcp4-c-lease.c',
|
'n-dhcp4/src/n-dhcp4-c-lease.c',
|
||||||
'n-dhcp4/src/n-dhcp4-c-probe.c',
|
|
||||||
'n-dhcp4/src/n-dhcp4-client.c',
|
'n-dhcp4/src/n-dhcp4-client.c',
|
||||||
|
'n-dhcp4/src/n-dhcp4-c-probe.c',
|
||||||
'n-dhcp4/src/n-dhcp4-incoming.c',
|
'n-dhcp4/src/n-dhcp4-incoming.c',
|
||||||
'n-dhcp4/src/n-dhcp4-outgoing.c',
|
'n-dhcp4/src/n-dhcp4-outgoing.c',
|
||||||
'n-dhcp4/src/n-dhcp4-private.h',
|
|
||||||
'n-dhcp4/src/n-dhcp4-socket.c',
|
'n-dhcp4/src/n-dhcp4-socket.c',
|
||||||
'n-dhcp4/src/n-dhcp4.h',
|
|
||||||
'n-dhcp4/src/util/packet.c',
|
'n-dhcp4/src/util/packet.c',
|
||||||
'n-dhcp4/src/util/packet.h',
|
|
||||||
'n-dhcp4/src/util/socket.c',
|
'n-dhcp4/src/util/socket.c',
|
||||||
'n-dhcp4/src/util/socket.h'),
|
)
|
||||||
c_args: [
|
|
||||||
|
incs = include_directories(
|
||||||
|
'c-list/src',
|
||||||
|
'c-siphash/src',
|
||||||
|
'c-stdaux/src',
|
||||||
|
)
|
||||||
|
|
||||||
|
c_flags = [
|
||||||
'-D_GNU_SOURCE',
|
'-D_GNU_SOURCE',
|
||||||
'-Wno-declaration-after-statement',
|
'-Wno-declaration-after-statement',
|
||||||
'-Wno-pointer-arith',
|
'-Wno-pointer-arith',
|
||||||
],
|
|
||||||
include_directories: [
|
|
||||||
include_directories('c-list/src'),
|
|
||||||
include_directories('c-siphash/src'),
|
|
||||||
include_directories('c-stdaux/src'),
|
|
||||||
],
|
|
||||||
dependencies: [
|
|
||||||
shared_c_siphash_dep,
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
shared_n_dhcp4_dep = declare_dependency(
|
|
||||||
include_directories: shared_inc,
|
|
||||||
link_with: shared_n_dhcp4,
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
version_conf = configuration_data()
|
|
||||||
version_conf.set('NM_MAJOR_VERSION', nm_major_version)
|
|
||||||
version_conf.set('NM_MINOR_VERSION', nm_minor_version)
|
|
||||||
version_conf.set('NM_MICRO_VERSION', nm_micro_version)
|
|
||||||
|
|
||||||
version_header = configure_file(
|
|
||||||
input: 'nm-version-macros.h.in',
|
|
||||||
output: 'nm-version-macros.h',
|
|
||||||
configuration: version_conf,
|
|
||||||
)
|
|
||||||
|
|
||||||
shared_nm_meta_setting_c = files('nm-meta-setting.c')
|
|
||||||
|
|
||||||
shared_nm_test_utils_impl_c = files('nm-test-utils-impl.c')
|
|
||||||
|
|
||||||
shared_nm_utils_nm_vpn_plugin_utils_c = files('nm-utils/nm-vpn-plugin-utils.c')
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
shared_nm_std_aux = static_library(
|
|
||||||
'nm-std-aux',
|
|
||||||
sources: files('nm-std-aux/c-list-util.c'),
|
|
||||||
c_args: [
|
|
||||||
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
|
||||||
'-DNETWORKMANAGER_COMPILATION=0',
|
|
||||||
],
|
|
||||||
include_directories: [
|
|
||||||
top_inc,
|
|
||||||
shared_inc,
|
|
||||||
],
|
|
||||||
dependencies: [
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
shared_nm_std_aux_dep = declare_dependency(
|
|
||||||
link_with: shared_nm_std_aux,
|
|
||||||
include_directories: [
|
|
||||||
top_inc,
|
|
||||||
shared_inc,
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
shared_nm_glib_aux_c_args = [
|
|
||||||
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
|
||||||
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
shared_nm_glib_aux = static_library(
|
libn_dhcp4 = static_library(
|
||||||
'nm-utils-base',
|
'n-dhcp4',
|
||||||
sources: files('nm-glib-aux/nm-dbus-aux.c',
|
sources: sources,
|
||||||
|
c_args: c_flags,
|
||||||
|
include_directories: incs,
|
||||||
|
link_with: libc_siphash,
|
||||||
|
)
|
||||||
|
|
||||||
|
libn_dhcp4_dep = declare_dependency(
|
||||||
|
include_directories: shared_inc,
|
||||||
|
link_with: libn_dhcp4,
|
||||||
|
)
|
||||||
|
|
||||||
|
nm_version_macro_conf = configuration_data()
|
||||||
|
nm_version_macro_conf.set('NM_MAJOR_VERSION', nm_major_version)
|
||||||
|
nm_version_macro_conf.set('NM_MINOR_VERSION', nm_minor_version)
|
||||||
|
nm_version_macro_conf.set('NM_MICRO_VERSION', nm_micro_version)
|
||||||
|
|
||||||
|
nm_version_macro_header = configure_file(
|
||||||
|
input: 'nm-version-macros.h.in',
|
||||||
|
output: '@BASENAME@',
|
||||||
|
configuration: nm_version_macro_conf,
|
||||||
|
)
|
||||||
|
|
||||||
|
nm_ethtool_utils_source = files('nm-libnm-core-intern/nm-ethtool-utils.c')
|
||||||
|
|
||||||
|
nm_libnm_core_aux_source = files('nm-libnm-core-aux/nm-libnm-core-aux.c')
|
||||||
|
|
||||||
|
nm_libnm_core_utils_source = files('nm-libnm-core-intern/nm-libnm-core-utils.c')
|
||||||
|
|
||||||
|
nm_meta_setting_source = files('nm-meta-setting.c')
|
||||||
|
|
||||||
|
nm_test_utils_impl_source = files('nm-test-utils-impl.c')
|
||||||
|
|
||||||
|
nm_vpn_plugin_utils_source = files('nm-utils/nm-vpn-plugin-utils.c')
|
||||||
|
|
||||||
|
c_flags = [
|
||||||
|
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
||||||
|
'-DNETWORKMANAGER_COMPILATION=0',
|
||||||
|
]
|
||||||
|
|
||||||
|
libnm_std_aux = static_library(
|
||||||
|
'nm-std-aux',
|
||||||
|
sources: 'nm-std-aux/c-list-util.c',
|
||||||
|
c_args: c_flags,
|
||||||
|
)
|
||||||
|
|
||||||
|
sources = files(
|
||||||
|
'nm-glib-aux/nm-dbus-aux.c',
|
||||||
'nm-glib-aux/nm-dedup-multi.c',
|
'nm-glib-aux/nm-dedup-multi.c',
|
||||||
'nm-glib-aux/nm-enum-utils.c',
|
'nm-glib-aux/nm-enum-utils.c',
|
||||||
'nm-glib-aux/nm-errno.c',
|
'nm-glib-aux/nm-errno.c',
|
||||||
@@ -188,62 +146,50 @@ shared_nm_glib_aux = static_library(
|
|||||||
'nm-glib-aux/nm-ref-string.c',
|
'nm-glib-aux/nm-ref-string.c',
|
||||||
'nm-glib-aux/nm-secret-utils.c',
|
'nm-glib-aux/nm-secret-utils.c',
|
||||||
'nm-glib-aux/nm-shared-utils.c',
|
'nm-glib-aux/nm-shared-utils.c',
|
||||||
'nm-glib-aux/nm-time-utils.c'),
|
'nm-glib-aux/nm-time-utils.c'
|
||||||
c_args: shared_nm_glib_aux_c_args,
|
|
||||||
include_directories: [
|
|
||||||
top_inc,
|
|
||||||
shared_inc,
|
|
||||||
],
|
|
||||||
dependencies: [
|
|
||||||
glib_dep,
|
|
||||||
shared_nm_std_aux_dep,
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
shared_nm_glib_aux_dep = declare_dependency(
|
c_flags = [
|
||||||
link_with: shared_nm_glib_aux,
|
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
||||||
include_directories: [
|
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)',
|
||||||
top_inc,
|
]
|
||||||
shared_inc,
|
|
||||||
],
|
links = [
|
||||||
dependencies: glib_dep,
|
libc_siphash,
|
||||||
|
libnm_std_aux,
|
||||||
|
]
|
||||||
|
|
||||||
|
libnm_utils_base = static_library(
|
||||||
|
'nm-utils-base',
|
||||||
|
sources: sources,
|
||||||
|
dependencies: glib_nm_default_dep,
|
||||||
|
c_args: c_flags,
|
||||||
|
link_with: links,
|
||||||
)
|
)
|
||||||
|
|
||||||
###############################################################################
|
libnm_utils_base_dep = declare_dependency(
|
||||||
|
dependencies: glib_nm_default_dep,
|
||||||
|
link_with: libnm_utils_base,
|
||||||
|
)
|
||||||
|
|
||||||
shared_nm_udev_aux = static_library(
|
deps = [
|
||||||
|
glib_nm_default_dep,
|
||||||
|
libudev_dep,
|
||||||
|
]
|
||||||
|
|
||||||
|
libnm_udev_aux = static_library(
|
||||||
'nm-udev-aux',
|
'nm-udev-aux',
|
||||||
sources: files('nm-udev-aux/nm-udev-utils.c'),
|
sources: 'nm-udev-aux/nm-udev-utils.c',
|
||||||
c_args: shared_nm_glib_aux_c_args,
|
dependencies: deps,
|
||||||
include_directories: [
|
c_args: c_flags,
|
||||||
top_inc,
|
|
||||||
shared_inc,
|
|
||||||
],
|
|
||||||
dependencies: [
|
|
||||||
glib_dep,
|
|
||||||
shared_nm_glib_aux_dep,
|
|
||||||
libudev_dep,
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
shared_nm_udev_aux_dep = declare_dependency(
|
libnm_udev_aux_dep = declare_dependency(
|
||||||
link_with: shared_nm_udev_aux,
|
include_directories: shared_inc,
|
||||||
include_directories: [
|
link_with: libnm_udev_aux,
|
||||||
top_inc,
|
|
||||||
shared_inc,
|
|
||||||
],
|
|
||||||
dependencies: [
|
|
||||||
glib_dep,
|
|
||||||
shared_nm_glib_aux_dep,
|
|
||||||
libudev_dep,
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
###############################################################################
|
sources = files(
|
||||||
|
|
||||||
libnm_systemd_shared = static_library(
|
|
||||||
'nm-systemd-shared',
|
|
||||||
sources: files(
|
|
||||||
'systemd/src/basic/alloc-util.c',
|
'systemd/src/basic/alloc-util.c',
|
||||||
'systemd/src/basic/escape.c',
|
'systemd/src/basic/escape.c',
|
||||||
'systemd/src/basic/env-file.c',
|
'systemd/src/basic/env-file.c',
|
||||||
@@ -279,56 +225,38 @@ libnm_systemd_shared = static_library(
|
|||||||
'systemd/src/basic/util.c',
|
'systemd/src/basic/util.c',
|
||||||
'systemd/src/shared/dns-domain.c',
|
'systemd/src/shared/dns-domain.c',
|
||||||
'systemd/nm-sd-utils-shared.c',
|
'systemd/nm-sd-utils-shared.c',
|
||||||
),
|
)
|
||||||
include_directories: include_directories(
|
|
||||||
|
incs = include_directories(
|
||||||
'systemd/sd-adapt-shared',
|
'systemd/sd-adapt-shared',
|
||||||
'systemd/src/basic',
|
'systemd/src/basic',
|
||||||
'systemd/src/shared',
|
'systemd/src/shared',
|
||||||
),
|
)
|
||||||
dependencies: shared_nm_glib_aux_dep,
|
|
||||||
c_args: [
|
c_flags = [
|
||||||
|
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
||||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD_SHARED',
|
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD_SHARED',
|
||||||
'-DG_LOG_DOMAIN="libnm"',
|
]
|
||||||
],
|
|
||||||
|
libnm_systemd_shared = static_library(
|
||||||
|
'nm-systemd-shared',
|
||||||
|
sources: sources,
|
||||||
|
include_directories: incs,
|
||||||
|
dependencies: glib_nm_default_dep,
|
||||||
|
c_args: c_flags,
|
||||||
)
|
)
|
||||||
|
|
||||||
libnm_systemd_shared_dep = declare_dependency(
|
libnm_systemd_shared_dep = declare_dependency(
|
||||||
include_directories: include_directories(
|
include_directories: incs,
|
||||||
'systemd/sd-adapt-shared',
|
dependencies: glib_dep,
|
||||||
'systemd/src/basic',
|
link_with: libnm_systemd_shared,
|
||||||
'systemd/src/shared',
|
|
||||||
),
|
|
||||||
dependencies: [
|
|
||||||
shared_nm_glib_aux_dep,
|
|
||||||
],
|
|
||||||
link_with: [
|
|
||||||
libnm_systemd_shared,
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
libnm_systemd_logging_stub = static_library(
|
libnm_systemd_logging_stub = static_library(
|
||||||
'nm-systemd-logging-stub',
|
'nm-systemd-logging-stub',
|
||||||
sources: files(
|
sources: 'systemd/nm-logging-stub.c',
|
||||||
'systemd/nm-logging-stub.c',
|
dependencies: glib_nm_default_dep,
|
||||||
),
|
c_args: c_flags,
|
||||||
include_directories: include_directories(
|
|
||||||
'systemd/sd-adapt-shared',
|
|
||||||
'systemd/src/basic',
|
|
||||||
),
|
|
||||||
dependencies: shared_nm_glib_aux_dep,
|
|
||||||
c_args: [
|
|
||||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD_SHARED',
|
|
||||||
'-DG_LOG_DOMAIN="libnm"',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
libnm_systemd_shared_no_logging_dep = declare_dependency(
|
|
||||||
dependencies: [
|
|
||||||
libnm_systemd_shared_dep,
|
|
||||||
],
|
|
||||||
link_with: [
|
|
||||||
libnm_systemd_logging_stub,
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if enable_tests
|
if enable_tests
|
||||||
|
@@ -1,17 +1,16 @@
|
|||||||
test_unit = 'test-shared-general'
|
test_unit = 'test-shared-general'
|
||||||
|
|
||||||
|
c_flags = [
|
||||||
|
'-DNETWORKMANAGER_COMPILATION_TEST',
|
||||||
|
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)',
|
||||||
|
]
|
||||||
|
|
||||||
exe = executable(
|
exe = executable(
|
||||||
test_unit,
|
test_unit,
|
||||||
test_unit + '.c',
|
test_unit + '.c',
|
||||||
c_args: [
|
c_args: c_flags,
|
||||||
'-DNETWORKMANAGER_COMPILATION_TEST',
|
dependencies: libnm_utils_base_dep,
|
||||||
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)',
|
link_with: libnm_systemd_logging_stub,
|
||||||
],
|
|
||||||
dependencies: [
|
|
||||||
shared_nm_glib_aux_dep,
|
|
||||||
libnm_systemd_shared_no_logging_dep,
|
|
||||||
shared_c_siphash_dep,
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
|
@@ -3,15 +3,11 @@ sources = files(
|
|||||||
'nm-device-adsl.c',
|
'nm-device-adsl.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
deps = [
|
|
||||||
libudev_dep,
|
|
||||||
nm_dep,
|
|
||||||
]
|
|
||||||
|
|
||||||
libnm_device_plugin_adsl = shared_module(
|
libnm_device_plugin_adsl = shared_module(
|
||||||
'nm-device-plugin-adsl',
|
'nm-device-plugin-adsl',
|
||||||
sources: sources,
|
sources: sources,
|
||||||
dependencies: deps,
|
dependencies: daemon_nm_default_dep,
|
||||||
|
c_args: daemon_c_flags,
|
||||||
link_args: ldflags_linker_script_devices,
|
link_args: ldflags_linker_script_devices,
|
||||||
link_depends: linker_script_devices,
|
link_depends: linker_script_devices,
|
||||||
install: true,
|
install: true,
|
||||||
@@ -25,10 +21,3 @@ test(
|
|||||||
check_exports,
|
check_exports,
|
||||||
args: [libnm_device_plugin_adsl.full_path(), linker_script_devices],
|
args: [libnm_device_plugin_adsl.full_path(), linker_script_devices],
|
||||||
)
|
)
|
||||||
|
|
||||||
# FIXME: check_so_symbols replacement
|
|
||||||
'''
|
|
||||||
check-local-devices-adsl: src/devices/adsl/libnm-device-plugin-adsl.la
|
|
||||||
$(srcdir)/tools/check-exports.sh $(builddir)/src/devices/adsl/.libs/libnm-device-plugin-adsl.so "$(srcdir)/linker-script-devices.ver"
|
|
||||||
$(call check_so_symbols,$(builddir)/src/devices/adsl/.libs/libnm-device-plugin-adsl.so)
|
|
||||||
'''
|
|
||||||
|
@@ -5,8 +5,8 @@ sources = files(
|
|||||||
)
|
)
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
|
daemon_nm_default_dep,
|
||||||
libnm_wwan_dep,
|
libnm_wwan_dep,
|
||||||
nm_dep,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if enable_bluez5_dun
|
if enable_bluez5_dun
|
||||||
@@ -19,6 +19,7 @@ libnm_device_plugin_bluetooth = shared_module(
|
|||||||
'nm-device-plugin-bluetooth',
|
'nm-device-plugin-bluetooth',
|
||||||
sources: sources,
|
sources: sources,
|
||||||
dependencies: deps,
|
dependencies: deps,
|
||||||
|
c_args: daemon_c_flags,
|
||||||
link_args: ldflags_linker_script_devices,
|
link_args: ldflags_linker_script_devices,
|
||||||
link_depends: linker_script_devices,
|
link_depends: linker_script_devices,
|
||||||
install: true,
|
install: true,
|
||||||
@@ -34,9 +35,11 @@ test(
|
|||||||
args: [libnm_device_plugin_bluetooth.full_path(), linker_script_devices],
|
args: [libnm_device_plugin_bluetooth.full_path(), linker_script_devices],
|
||||||
)
|
)
|
||||||
|
|
||||||
# FIXME: check_so_symbols replacement
|
test_unit = 'nm-bt-test'
|
||||||
'''
|
|
||||||
check-local-devices-bluetooth: src/devices/bluetooth/libnm-device-plugin-bluetooth.la
|
executable(
|
||||||
$(srcdir)/tools/check-exports.sh $(builddir)/src/devices/bluetooth/.libs/libnm-device-plugin-bluetooth.so "$(srcdir)/linker-script-devices.ver"
|
test_unit,
|
||||||
$(call check_so_symbols,$(builddir)/src/devices/bluetooth/.libs/libnm-device-plugin-bluetooth.so)
|
'tests/' + test_unit + '.c',
|
||||||
'''
|
dependencies: libnetwork_manager_test_dep,
|
||||||
|
c_args: test_c_flags,
|
||||||
|
)
|
||||||
|
@@ -7,14 +7,15 @@ sources = files(
|
|||||||
)
|
)
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
|
daemon_nm_default_dep,
|
||||||
jansson_dep,
|
jansson_dep,
|
||||||
nm_dep,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
libnm_device_plugin_ovs = shared_module(
|
libnm_device_plugin_ovs = shared_module(
|
||||||
'nm-device-plugin-ovs',
|
'nm-device-plugin-ovs',
|
||||||
sources: sources,
|
sources: sources,
|
||||||
dependencies: deps,
|
dependencies: deps,
|
||||||
|
c_args: daemon_c_flags,
|
||||||
link_args: ldflags_linker_script_devices,
|
link_args: ldflags_linker_script_devices,
|
||||||
link_depends: linker_script_devices,
|
link_depends: linker_script_devices,
|
||||||
install: true,
|
install: true,
|
||||||
@@ -28,10 +29,3 @@ test(
|
|||||||
check_exports,
|
check_exports,
|
||||||
args: [libnm_device_plugin_ovs.full_path(), linker_script_devices],
|
args: [libnm_device_plugin_ovs.full_path(), linker_script_devices],
|
||||||
)
|
)
|
||||||
|
|
||||||
# FIXME: check_so_symbols replacement
|
|
||||||
'''
|
|
||||||
check-local-devices-ovs: src/devices/ovs/libnm-device-plugin-ovs.la
|
|
||||||
$(srcdir)/tools/check-exports.sh $(builddir)/src/devices/ovs/.libs/libnm-device-plugin-ovs.so "$(srcdir)/linker-script-devices.ver"
|
|
||||||
$(call check_so_symbols,$(builddir)/src/devices/ovs/.libs/libnm-device-plugin-ovs.so)
|
|
||||||
'''
|
|
||||||
|
@@ -4,15 +4,16 @@ sources = files(
|
|||||||
)
|
)
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
|
daemon_nm_default_dep,
|
||||||
jansson_dep,
|
jansson_dep,
|
||||||
libteamdctl_dep,
|
libteamdctl_dep,
|
||||||
nm_dep,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
libnm_device_plugin_team = shared_module(
|
libnm_device_plugin_team = shared_module(
|
||||||
'nm-device-plugin-team',
|
'nm-device-plugin-team',
|
||||||
sources: sources,
|
sources: sources,
|
||||||
dependencies: deps,
|
dependencies: deps,
|
||||||
|
c_args: daemon_c_flags,
|
||||||
link_args: ldflags_linker_script_devices,
|
link_args: ldflags_linker_script_devices,
|
||||||
link_depends: linker_script_devices,
|
link_depends: linker_script_devices,
|
||||||
install: true,
|
install: true,
|
||||||
@@ -26,10 +27,3 @@ test(
|
|||||||
check_exports,
|
check_exports,
|
||||||
args: [libnm_device_plugin_team.full_path(), linker_script_devices],
|
args: [libnm_device_plugin_team.full_path(), linker_script_devices],
|
||||||
)
|
)
|
||||||
|
|
||||||
# FIXME: check_so_symbols replacement
|
|
||||||
'''
|
|
||||||
check-local-devices-team: src/devices/team/libnm-device-plugin-team.la
|
|
||||||
$(srcdir)/tools/check-exports.sh $(builddir)/src/devices/team/.libs/libnm-device-plugin-team.so "$(srcdir)/linker-script-devices.ver"
|
|
||||||
$(call check_so_symbols,$(builddir)/src/devices/team/.libs/libnm-device-plugin-team.so)
|
|
||||||
'''
|
|
||||||
|
@@ -7,8 +7,10 @@ foreach test_unit: test_units
|
|||||||
exe = executable(
|
exe = executable(
|
||||||
test_unit,
|
test_unit,
|
||||||
test_unit + '.c',
|
test_unit + '.c',
|
||||||
dependencies: test_nm_dep,
|
dependencies: libnetwork_manager_test_dep,
|
||||||
|
c_args: test_c_flags,
|
||||||
)
|
)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
'devices/' + test_unit,
|
'devices/' + test_unit,
|
||||||
test_script,
|
test_script,
|
||||||
|
@@ -19,14 +19,11 @@ if enable_iwd
|
|||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
deps = [
|
|
||||||
nm_dep,
|
|
||||||
]
|
|
||||||
|
|
||||||
libnm_device_plugin_wifi = shared_module(
|
libnm_device_plugin_wifi = shared_module(
|
||||||
'nm-device-plugin-wifi',
|
'nm-device-plugin-wifi',
|
||||||
sources: sources,
|
sources: sources,
|
||||||
dependencies: deps,
|
dependencies: daemon_nm_default_dep,
|
||||||
|
c_args: daemon_c_flags,
|
||||||
link_args: ldflags_linker_script_devices,
|
link_args: ldflags_linker_script_devices,
|
||||||
link_depends: linker_script_devices,
|
link_depends: linker_script_devices,
|
||||||
install: true,
|
install: true,
|
||||||
@@ -41,13 +38,20 @@ test(
|
|||||||
args: [libnm_device_plugin_wifi.full_path(), linker_script_devices],
|
args: [libnm_device_plugin_wifi.full_path(), linker_script_devices],
|
||||||
)
|
)
|
||||||
|
|
||||||
# FIXME: check_so_symbols replacement
|
|
||||||
'''
|
|
||||||
check-local-devices-wifi: src/devices/wifi/libnm-device-plugin-wifi.la
|
|
||||||
$(srcdir)/tools/check-exports.sh $(builddir)/src/devices/wifi/.libs/libnm-device-plugin-wifi.so "$(srcdir)/linker-script-devices.ver"
|
|
||||||
$(call check_so_symbols,$(builddir)/src/devices/wifi/.libs/libnm-device-plugin-wifi.so)
|
|
||||||
'''
|
|
||||||
|
|
||||||
if enable_tests
|
if enable_tests
|
||||||
subdir('tests')
|
test_unit = 'test-devices-wifi'
|
||||||
|
|
||||||
|
exe = executable(
|
||||||
|
test_unit,
|
||||||
|
['tests/' + test_unit + '.c'] + common_sources,
|
||||||
|
dependencies: libnetwork_manager_test_dep,
|
||||||
|
c_args: test_c_flags,
|
||||||
|
)
|
||||||
|
|
||||||
|
test(
|
||||||
|
test_unit,
|
||||||
|
test_script,
|
||||||
|
args: test_args + [exe.full_path()],
|
||||||
|
timeout: default_test_timeout,
|
||||||
|
)
|
||||||
endif
|
endif
|
||||||
|
@@ -1,14 +0,0 @@
|
|||||||
test_unit = 'test-devices-wifi'
|
|
||||||
|
|
||||||
exe = executable(
|
|
||||||
test_unit,
|
|
||||||
[test_unit + '.c'] + common_sources,
|
|
||||||
dependencies: test_nm_dep,
|
|
||||||
)
|
|
||||||
|
|
||||||
test(
|
|
||||||
test_unit,
|
|
||||||
test_script,
|
|
||||||
args: test_args + [exe.full_path()],
|
|
||||||
timeout: default_test_timeout,
|
|
||||||
)
|
|
@@ -1,14 +1,15 @@
|
|||||||
sources = files(
|
nm_service_providers_source = files('nm-service-providers.c')
|
||||||
|
|
||||||
|
sources = nm_service_providers_source + files(
|
||||||
'nm-modem-broadband.c',
|
'nm-modem-broadband.c',
|
||||||
'nm-modem.c',
|
'nm-modem.c',
|
||||||
'nm-modem-manager.c',
|
'nm-modem-manager.c',
|
||||||
'nm-service-providers.c',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
|
daemon_nm_default_dep,
|
||||||
libsystemd_dep,
|
libsystemd_dep,
|
||||||
mm_glib_dep,
|
mm_glib_dep,
|
||||||
nm_dep,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if enable_ofono
|
if enable_ofono
|
||||||
@@ -21,9 +22,8 @@ libnm_wwan = shared_module(
|
|||||||
'nm-wwan',
|
'nm-wwan',
|
||||||
sources: sources,
|
sources: sources,
|
||||||
dependencies: deps,
|
dependencies: deps,
|
||||||
link_args: [
|
c_args: daemon_c_flags,
|
||||||
'-Wl,--version-script,@0@'.format(linker_script),
|
link_args: '-Wl,--version-script,@0@'.format(linker_script),
|
||||||
],
|
|
||||||
link_depends: linker_script,
|
link_depends: linker_script,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: nm_plugindir,
|
install_dir: nm_plugindir,
|
||||||
@@ -53,6 +53,7 @@ libnm_device_plugin_wwan = shared_module(
|
|||||||
'nm-device-plugin-wwan',
|
'nm-device-plugin-wwan',
|
||||||
sources: sources,
|
sources: sources,
|
||||||
dependencies: deps,
|
dependencies: deps,
|
||||||
|
c_args: daemon_c_flags,
|
||||||
link_with: libnm_wwan,
|
link_with: libnm_wwan,
|
||||||
link_args: ldflags_linker_script_devices,
|
link_args: ldflags_linker_script_devices,
|
||||||
link_depends: linker_script_devices,
|
link_depends: linker_script_devices,
|
||||||
@@ -69,15 +70,21 @@ run_target(
|
|||||||
depends: libnm_device_plugin_wwan,
|
depends: libnm_device_plugin_wwan,
|
||||||
)
|
)
|
||||||
|
|
||||||
# FIXME: check_so_symbols replacement
|
|
||||||
'''
|
|
||||||
check-local-devices-wwan: src/devices/wwan/libnm-device-plugin-wwan.la src/devices/wwan/libnm-wwan.la
|
|
||||||
$(srcdir)/tools/check-exports.sh $(builddir)/src/devices/wwan/.libs/libnm-device-plugin-wwan.so "$(srcdir)/linker-script-devices.ver"
|
|
||||||
$(call check_so_symbols,$(builddir)/src/devices/wwan/.libs/libnm-device-plugin-wwan.so)
|
|
||||||
$(srcdir)/tools/check-exports.sh $(builddir)/src/devices/wwan/.libs/libnm-wwan.so "$(srcdir)/src/devices/wwan/libnm-wwan.ver"
|
|
||||||
$(call check_so_symbols,$(builddir)/src/devices/wwan/.libs/libnm-wwan.so)
|
|
||||||
'''
|
|
||||||
|
|
||||||
if enable_tests
|
if enable_tests
|
||||||
subdir('tests')
|
test_unit = 'test-service-providers'
|
||||||
|
|
||||||
|
exe = executable(
|
||||||
|
test_unit,
|
||||||
|
['tests/' + test_unit + '.c'] + nm_service_providers_source,
|
||||||
|
include_directories: wwan_inc,
|
||||||
|
dependencies: libnetwork_manager_test_dep,
|
||||||
|
c_args: test_c_flags,
|
||||||
|
)
|
||||||
|
|
||||||
|
test(
|
||||||
|
'wwan/' + test_unit,
|
||||||
|
test_script,
|
||||||
|
timeout: default_test_timeout,
|
||||||
|
args: test_args + [exe.full_path()],
|
||||||
|
)
|
||||||
endif
|
endif
|
||||||
|
@@ -1,13 +0,0 @@
|
|||||||
exe = executable(
|
|
||||||
'test-service-providers',
|
|
||||||
sources: files('test-service-providers.c',
|
|
||||||
'../nm-service-providers.c'),
|
|
||||||
dependencies: test_nm_dep,
|
|
||||||
include_directories: wwan_inc,
|
|
||||||
)
|
|
||||||
test(
|
|
||||||
'wwan/test-service-providers',
|
|
||||||
test_script,
|
|
||||||
timeout: default_test_timeout,
|
|
||||||
args: test_args + [exe.full_path()],
|
|
||||||
)
|
|
@@ -1,6 +1,6 @@
|
|||||||
name = 'nm-dhcp-helper'
|
name = 'nm-dhcp-helper'
|
||||||
|
|
||||||
cflags = [
|
c_flags = [
|
||||||
'-DG_LOG_DOMAIN="@0@"'.format(name),
|
'-DG_LOG_DOMAIN="@0@"'.format(name),
|
||||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_GLIB',
|
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_GLIB',
|
||||||
]
|
]
|
||||||
@@ -8,8 +8,8 @@ cflags = [
|
|||||||
executable(
|
executable(
|
||||||
name,
|
name,
|
||||||
name + '.c',
|
name + '.c',
|
||||||
dependencies: libnm_core_dep,
|
dependencies: glib_nm_default_dep,
|
||||||
c_args: cflags,
|
c_args: c_flags,
|
||||||
link_args: ldflags_linker_script_binary,
|
link_args: ldflags_linker_script_binary,
|
||||||
link_depends: linker_script_binary,
|
link_depends: linker_script_binary,
|
||||||
install: true,
|
install: true,
|
||||||
|
@@ -7,7 +7,8 @@ foreach test_unit: test_units
|
|||||||
exe = executable(
|
exe = executable(
|
||||||
test_unit,
|
test_unit,
|
||||||
test_unit + '.c',
|
test_unit + '.c',
|
||||||
dependencies: test_nm_dep,
|
dependencies: libnetwork_manager_test_dep,
|
||||||
|
c_args: test_c_flags,
|
||||||
)
|
)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
|
@@ -3,7 +3,8 @@ test_unit = 'test-dnsmasq-utils'
|
|||||||
exe = executable(
|
exe = executable(
|
||||||
test_unit,
|
test_unit,
|
||||||
test_unit + '.c',
|
test_unit + '.c',
|
||||||
dependencies: test_nm_dep,
|
dependencies: libnetwork_manager_test_dep,
|
||||||
|
c_args: test_c_flags,
|
||||||
)
|
)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
|
@@ -4,24 +4,26 @@ sources = files(
|
|||||||
'nmi-ibft-reader.c',
|
'nmi-ibft-reader.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
nm_cflags = ['-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_DAEMON']
|
|
||||||
|
|
||||||
libnmi_core = static_library(
|
libnmi_core = static_library(
|
||||||
'nmi-core',
|
'nmi-core',
|
||||||
c_args: nm_cflags,
|
|
||||||
sources: sources,
|
sources: sources,
|
||||||
include_directories: src_inc,
|
dependencies: daemon_nm_default_dep,
|
||||||
dependencies: libnm_core_dep,
|
c_args: daemon_c_flags,
|
||||||
)
|
)
|
||||||
|
|
||||||
name = 'nm-initrd-generator'
|
name = 'nm-initrd-generator'
|
||||||
|
|
||||||
|
links = [
|
||||||
|
libnetwork_manager_base,
|
||||||
|
libnmi_core,
|
||||||
|
]
|
||||||
|
|
||||||
executable(
|
executable(
|
||||||
name,
|
name,
|
||||||
name + '.c',
|
name + '.c',
|
||||||
c_args: nm_cflags,
|
dependencies: daemon_nm_default_dep,
|
||||||
include_directories: src_inc,
|
c_args: daemon_c_flags,
|
||||||
dependencies: [ libnm_core_dep ],
|
link_with: links,
|
||||||
link_with: [libnetwork_manager_base, libnmi_core],
|
|
||||||
link_args: ldflags_linker_script_binary,
|
link_args: ldflags_linker_script_binary,
|
||||||
link_depends: linker_script_binary,
|
link_depends: linker_script_binary,
|
||||||
install: true,
|
install: true,
|
||||||
|
@@ -1,21 +1,20 @@
|
|||||||
|
c_flags = test_c_flags + ['-DTEST_INITRD_DIR="@0@"'.format(meson.current_source_dir())]
|
||||||
|
|
||||||
test_units = [
|
test_units = [
|
||||||
'test-dt-reader',
|
'test-dt-reader',
|
||||||
'test-ibft-reader',
|
'test-ibft-reader',
|
||||||
'test-cmdline-reader',
|
'test-cmdline-reader',
|
||||||
]
|
]
|
||||||
|
|
||||||
cflags = [
|
|
||||||
'-DTEST_INITRD_DIR="@0@"'.format(meson.current_source_dir()),
|
|
||||||
]
|
|
||||||
|
|
||||||
foreach test_unit : test_units
|
foreach test_unit : test_units
|
||||||
exe = executable(
|
exe = executable(
|
||||||
test_unit,
|
test_unit,
|
||||||
test_unit + '.c',
|
test_unit + '.c',
|
||||||
dependencies: test_nm_dep,
|
dependencies: libnetwork_manager_test_dep,
|
||||||
c_args: cflags,
|
c_args: c_flags,
|
||||||
link_with: libnmi_core,
|
link_with: libnmi_core,
|
||||||
)
|
)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
'initrd/' + test_unit,
|
'initrd/' + test_unit,
|
||||||
test_script,
|
test_script,
|
||||||
|
120
src/meson.build
120
src/meson.build
@@ -1,5 +1,11 @@
|
|||||||
src_inc = include_directories('.')
|
src_inc = include_directories('.')
|
||||||
|
|
||||||
|
daemon_nm_default_dep = declare_dependency(
|
||||||
|
sources: libnm_core_enum_sources[1],
|
||||||
|
include_directories: src_inc,
|
||||||
|
dependencies: libnm_core_nm_default_dep,
|
||||||
|
)
|
||||||
|
|
||||||
install_data(
|
install_data(
|
||||||
'org.freedesktop.NetworkManager.conf',
|
'org.freedesktop.NetworkManager.conf',
|
||||||
install_dir: dbus_conf_dir,
|
install_dir: dbus_conf_dir,
|
||||||
@@ -9,15 +15,7 @@ subdir('systemd')
|
|||||||
|
|
||||||
core_plugins = []
|
core_plugins = []
|
||||||
|
|
||||||
nm_cflags = ['-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_DAEMON']
|
daemon_c_flags = ['-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_DAEMON']
|
||||||
|
|
||||||
nm_dep = declare_dependency(
|
|
||||||
include_directories: src_inc,
|
|
||||||
dependencies: libnm_core_dep,
|
|
||||||
compile_args: nm_cflags,
|
|
||||||
)
|
|
||||||
|
|
||||||
cflags = nm_cflags
|
|
||||||
|
|
||||||
sources = files(
|
sources = files(
|
||||||
'dhcp/nm-dhcp-client.c',
|
'dhcp/nm-dhcp-client.c',
|
||||||
@@ -49,10 +47,13 @@ sources = files(
|
|||||||
)
|
)
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
|
daemon_nm_default_dep,
|
||||||
|
libn_dhcp4_dep,
|
||||||
|
libnm_core_dep,
|
||||||
|
libnm_systemd_shared_dep,
|
||||||
|
libnm_udev_aux_dep,
|
||||||
libsystemd_dep,
|
libsystemd_dep,
|
||||||
libudev_dep,
|
libudev_dep,
|
||||||
libnm_core_dep,
|
|
||||||
shared_n_dhcp4_dep,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if enable_wext
|
if enable_wext
|
||||||
@@ -63,8 +64,7 @@ libnetwork_manager_base = static_library(
|
|||||||
nm_name + 'Base',
|
nm_name + 'Base',
|
||||||
sources: sources,
|
sources: sources,
|
||||||
dependencies: deps,
|
dependencies: deps,
|
||||||
c_args: cflags,
|
c_args: daemon_c_flags,
|
||||||
link_with: libnm_core,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
sources = files(
|
sources = files(
|
||||||
@@ -151,14 +151,20 @@ sources = files(
|
|||||||
)
|
)
|
||||||
|
|
||||||
nm_deps = [
|
nm_deps = [
|
||||||
|
daemon_nm_default_dep,
|
||||||
dl_dep,
|
dl_dep,
|
||||||
|
libn_acd_dep,
|
||||||
libndp_dep,
|
libndp_dep,
|
||||||
libudev_dep,
|
libudev_dep,
|
||||||
libnm_core_dep,
|
|
||||||
shared_n_acd_dep,
|
|
||||||
logind_dep,
|
logind_dep,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
nm_links = [
|
||||||
|
libnetwork_manager_base,
|
||||||
|
libnm_systemd_core,
|
||||||
|
libnm_systemd_shared,
|
||||||
|
]
|
||||||
|
|
||||||
if enable_concheck
|
if enable_concheck
|
||||||
nm_deps += libcurl_dep
|
nm_deps += libcurl_dep
|
||||||
endif
|
endif
|
||||||
@@ -179,19 +185,15 @@ libnetwork_manager = static_library(
|
|||||||
nm_name,
|
nm_name,
|
||||||
sources: sources,
|
sources: sources,
|
||||||
dependencies: nm_deps,
|
dependencies: nm_deps,
|
||||||
c_args: cflags,
|
c_args: daemon_c_flags,
|
||||||
link_with: [
|
link_with: nm_links,
|
||||||
libnetwork_manager_base,
|
|
||||||
libnm_systemd_core,
|
|
||||||
libnm_systemd_shared,
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
|
daemon_nm_default_dep,
|
||||||
dl_dep,
|
dl_dep,
|
||||||
libndp_dep,
|
libndp_dep,
|
||||||
libudev_dep,
|
libudev_dep,
|
||||||
libnm_core_dep,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
name = 'nm-iface-helper'
|
name = 'nm-iface-helper'
|
||||||
@@ -200,12 +202,8 @@ executable(
|
|||||||
name,
|
name,
|
||||||
name + '.c',
|
name + '.c',
|
||||||
dependencies: deps,
|
dependencies: deps,
|
||||||
c_args: cflags,
|
c_args: daemon_c_flags,
|
||||||
link_with: [
|
link_with: nm_links,
|
||||||
libnetwork_manager_base,
|
|
||||||
libnm_systemd_core,
|
|
||||||
libnm_systemd_shared,
|
|
||||||
],
|
|
||||||
link_args: ldflags_linker_script_binary,
|
link_args: ldflags_linker_script_binary,
|
||||||
link_depends: linker_script_binary,
|
link_depends: linker_script_binary,
|
||||||
install: true,
|
install: true,
|
||||||
@@ -213,46 +211,30 @@ executable(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if enable_tests
|
if enable_tests
|
||||||
|
test_c_flags = daemon_c_flags + ['-DNETWORKMANAGER_COMPILATION_TEST']
|
||||||
|
if require_root_tests
|
||||||
|
test_c_flags += ['-DREQUIRE_ROOT_TESTS=1']
|
||||||
|
endif
|
||||||
|
|
||||||
sources = files(
|
sources = files(
|
||||||
'ndisc/nm-fake-ndisc.c',
|
'ndisc/nm-fake-ndisc.c',
|
||||||
'platform/tests/test-common.c',
|
'platform/tests/test-common.c',
|
||||||
'platform/nm-fake-platform.c',
|
'platform/nm-fake-platform.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
deps = [
|
|
||||||
libudev_dep,
|
|
||||||
libnm_core_dep,
|
|
||||||
]
|
|
||||||
|
|
||||||
test_cflags = ['-DNETWORKMANAGER_COMPILATION_TEST']
|
|
||||||
if require_root_tests
|
|
||||||
test_cflags += ['-DREQUIRE_ROOT_TESTS=1']
|
|
||||||
endif
|
|
||||||
|
|
||||||
libnetwork_manager_test = static_library(
|
libnetwork_manager_test = static_library(
|
||||||
nm_name + 'Test',
|
nm_name + 'Test',
|
||||||
sources: sources,
|
sources: sources,
|
||||||
dependencies: deps,
|
dependencies: daemon_nm_default_dep,
|
||||||
c_args: cflags + test_cflags,
|
c_args: test_c_flags,
|
||||||
link_with: libnetwork_manager,
|
link_with: libnetwork_manager,
|
||||||
)
|
)
|
||||||
|
|
||||||
test_nm_dep = declare_dependency(
|
libnetwork_manager_test_dep = declare_dependency(
|
||||||
dependencies: nm_dep,
|
dependencies: daemon_nm_default_dep,
|
||||||
compile_args: test_cflags,
|
|
||||||
link_with: libnetwork_manager_test,
|
link_with: libnetwork_manager_test,
|
||||||
)
|
)
|
||||||
|
|
||||||
test_nm_dep_fake = declare_dependency(
|
|
||||||
dependencies: test_nm_dep,
|
|
||||||
compile_args: ['-DSETUP=nm_fake_platform_setup']
|
|
||||||
)
|
|
||||||
|
|
||||||
test_nm_dep_linux = declare_dependency(
|
|
||||||
dependencies: test_nm_dep,
|
|
||||||
compile_args: ['-DSETUP=nm_linux_platform_setup']
|
|
||||||
)
|
|
||||||
|
|
||||||
subdir('dnsmasq/tests')
|
subdir('dnsmasq/tests')
|
||||||
subdir('ndisc/tests')
|
subdir('ndisc/tests')
|
||||||
subdir('platform/tests')
|
subdir('platform/tests')
|
||||||
@@ -272,7 +254,7 @@ subdir('settings/plugins')
|
|||||||
|
|
||||||
# NetworkManager binary
|
# NetworkManager binary
|
||||||
|
|
||||||
create_exports_networkmanager = join_paths(meson.source_root(), 'tools', 'create-exports-NetworkManager.sh')
|
create_exports_networkmanager = join_paths(source_root, 'tools', 'create-exports-NetworkManager.sh')
|
||||||
symbol_map_name = 'NetworkManager.ver'
|
symbol_map_name = 'NetworkManager.ver'
|
||||||
|
|
||||||
# libNetworkManager.a, as built by meson doesn't contain all symbols
|
# libNetworkManager.a, as built by meson doesn't contain all symbols
|
||||||
@@ -283,28 +265,30 @@ symbol_map_name = 'NetworkManager.ver'
|
|||||||
network_manager_sym = executable(
|
network_manager_sym = executable(
|
||||||
'nm-full-symbols',
|
'nm-full-symbols',
|
||||||
'main.c',
|
'main.c',
|
||||||
c_args: nm_cflags,
|
|
||||||
link_args: '-Wl,--no-gc-sections',
|
|
||||||
dependencies: nm_deps,
|
dependencies: nm_deps,
|
||||||
|
c_args: daemon_c_flags,
|
||||||
|
link_args: '-Wl,--no-gc-sections',
|
||||||
link_whole: [libnetwork_manager, libnetwork_manager_base, libnm_core],
|
link_whole: [libnetwork_manager, libnetwork_manager_base, libnm_core],
|
||||||
install: false,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# this uses symbols from nm-full-symbols instead of libNetworkManager.a
|
# this uses symbols from nm-full-symbols instead of libNetworkManager.a
|
||||||
ver_script = custom_target(
|
ver_script = custom_target(
|
||||||
symbol_map_name,
|
symbol_map_name,
|
||||||
output: symbol_map_name,
|
output: symbol_map_name,
|
||||||
depends: [ network_manager_sym, core_plugins ],
|
depends: [network_manager_sym, core_plugins],
|
||||||
command: [create_exports_networkmanager, '--called-from-build', meson.source_root()],
|
command: [create_exports_networkmanager, '--called-from-build', source_root],
|
||||||
)
|
)
|
||||||
|
|
||||||
ldflags = ['-rdynamic', '-Wl,--version-script,@0@'.format(ver_script.full_path())]
|
ldflags = [
|
||||||
|
'-rdynamic',
|
||||||
|
'-Wl,--version-script,@0@'.format(ver_script.full_path()),
|
||||||
|
]
|
||||||
|
|
||||||
network_manager = executable(
|
network_manager = executable(
|
||||||
nm_name,
|
nm_name,
|
||||||
'main.c',
|
'main.c',
|
||||||
dependencies: nm_deps,
|
dependencies: nm_deps,
|
||||||
c_args: nm_cflags,
|
c_args: daemon_c_flags,
|
||||||
link_with: libnetwork_manager,
|
link_with: libnetwork_manager,
|
||||||
link_args: ldflags,
|
link_args: ldflags,
|
||||||
link_depends: ver_script,
|
link_depends: ver_script,
|
||||||
@@ -313,16 +297,20 @@ network_manager = executable(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if enable_tests
|
if enable_tests
|
||||||
foreach plugin : core_plugins
|
foreach plugin: core_plugins
|
||||||
test ('sym/' + plugin.full_path().split('/')[-1],
|
plugin_path = plugin.full_path()
|
||||||
|
|
||||||
|
test(
|
||||||
|
'sym/' + plugin_path.split('/')[-1],
|
||||||
network_manager,
|
network_manager,
|
||||||
args: '--version',
|
args: '--version',
|
||||||
env: ['LD_BIND_NOW=1', 'LD_PRELOAD=' + plugin.full_path()])
|
env: ['LD_BIND_NOW=1', 'LD_PRELOAD=' + plugin_path],
|
||||||
|
)
|
||||||
endforeach
|
endforeach
|
||||||
endif
|
endif
|
||||||
|
|
||||||
test(
|
test(
|
||||||
'check-config-options',
|
'check-config-options',
|
||||||
find_program(join_paths(meson.source_root(), 'tools', 'check-config-options.sh')),
|
find_program(join_paths(source_root, 'tools', 'check-config-options.sh')),
|
||||||
args: [meson.source_root()]
|
args: source_root,
|
||||||
)
|
)
|
||||||
|
@@ -3,7 +3,8 @@ test_unit = 'test-ndisc-fake'
|
|||||||
exe = executable(
|
exe = executable(
|
||||||
test_unit,
|
test_unit,
|
||||||
test_unit + '.c',
|
test_unit + '.c',
|
||||||
dependencies: test_nm_dep_fake,
|
dependencies: libnetwork_manager_test_dep,
|
||||||
|
c_args: test_c_flags,
|
||||||
)
|
)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
@@ -18,5 +19,6 @@ test = 'test-ndisc-linux'
|
|||||||
exe = executable(
|
exe = executable(
|
||||||
test,
|
test,
|
||||||
test + '.c',
|
test + '.c',
|
||||||
dependencies: test_nm_dep_linux,
|
dependencies: libnetwork_manager_test_dep,
|
||||||
|
c_args: test_c_flags,
|
||||||
)
|
)
|
||||||
|
@@ -1,21 +1,25 @@
|
|||||||
|
test_fake_c_flags = test_c_flags + ['-DSETUP=nm_fake_platform_setup']
|
||||||
|
test_linux_c_flags = test_c_flags + ['-DSETUP=nm_linux_platform_setup']
|
||||||
|
|
||||||
test_units = [
|
test_units = [
|
||||||
[ 'test-address-fake', 'test-address.c', test_nm_dep_fake, default_test_timeout ],
|
['test-address-fake', 'test-address.c', test_fake_c_flags, default_test_timeout],
|
||||||
[ 'test-address-linux', 'test-address.c', test_nm_dep_linux, default_test_timeout ],
|
['test-address-linux', 'test-address.c', test_linux_c_flags, default_test_timeout],
|
||||||
[ 'test-cleanup-fake', 'test-cleanup.c', test_nm_dep_fake, default_test_timeout ],
|
['test-cleanup-fake', 'test-cleanup.c', test_fake_c_flags, default_test_timeout],
|
||||||
[ 'test-cleanup-linux', 'test-cleanup.c', test_nm_dep_linux, default_test_timeout ],
|
['test-cleanup-linux', 'test-cleanup.c', test_linux_c_flags, default_test_timeout],
|
||||||
[ 'test-link-fake', 'test-link.c', test_nm_dep_fake, default_test_timeout ],
|
['test-link-fake', 'test-link.c', test_fake_c_flags, default_test_timeout],
|
||||||
[ 'test-link-linux', 'test-link.c', test_nm_dep_linux, 900 ],
|
['test-link-linux', 'test-link.c', test_linux_c_flags, 900],
|
||||||
[ 'test-nmp-object', 'test-nmp-object.c', test_nm_dep, default_test_timeout ],
|
['test-nmp-object', 'test-nmp-object.c', test_c_flags, default_test_timeout],
|
||||||
[ 'test-platform-general', 'test-platform-general.c', test_nm_dep, default_test_timeout ],
|
['test-platform-general', 'test-platform-general.c', test_c_flags, default_test_timeout],
|
||||||
[ 'test-route-fake', 'test-route.c', test_nm_dep_fake, default_test_timeout ],
|
['test-route-fake', 'test-route.c', test_fake_c_flags, default_test_timeout],
|
||||||
[ 'test-route-linux', 'test-route.c', test_nm_dep_linux, default_test_timeout ],
|
['test-route-linux', 'test-route.c', test_linux_c_flags, default_test_timeout],
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach test_unit: test_units
|
foreach test_unit: test_units
|
||||||
exe = executable(
|
exe = executable(
|
||||||
test_unit[0],
|
test_unit[0],
|
||||||
test_unit[1],
|
test_unit[1],
|
||||||
dependencies: test_unit[2],
|
dependencies: libnetwork_manager_test_dep,
|
||||||
|
c_args: test_unit[2],
|
||||||
)
|
)
|
||||||
test(
|
test(
|
||||||
'platform/' + test_unit[0],
|
'platform/' + test_unit[0],
|
||||||
@@ -25,8 +29,11 @@ foreach test_unit: test_units
|
|||||||
)
|
)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
name = 'monitor'
|
||||||
|
|
||||||
executable(
|
executable(
|
||||||
'monitor',
|
name,
|
||||||
'monitor.c',
|
name + '.c',
|
||||||
dependencies: test_nm_dep,
|
dependencies: libnetwork_manager_test_dep,
|
||||||
|
c_args: test_c_flags,
|
||||||
)
|
)
|
||||||
|
@@ -1,39 +1,30 @@
|
|||||||
name = 'nm-pppd-plugin'
|
name = 'nm-pppd-plugin'
|
||||||
|
|
||||||
deps = [
|
c_flags = [
|
||||||
dl_dep,
|
'-DG_LOG_DOMAIN="@0@"'.format(name),
|
||||||
libnm_core_dep,
|
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_GLIB',
|
||||||
]
|
]
|
||||||
|
|
||||||
nm_pppd_plugin = shared_module(
|
nm_pppd_plugin = shared_module(
|
||||||
name,
|
name,
|
||||||
name_prefix: '',
|
name_prefix: '',
|
||||||
sources: name + '.c',
|
sources: name + '.c',
|
||||||
include_directories: src_inc,
|
dependencies: libnm_core_nm_default_dep,
|
||||||
dependencies: deps,
|
c_args: c_flags,
|
||||||
c_args: [
|
|
||||||
'-DG_LOG_DOMAIN="@0@"'.format(name),
|
|
||||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_GLIB',
|
|
||||||
],
|
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: pppd_plugin_dir,
|
install_dir: pppd_plugin_dir,
|
||||||
)
|
)
|
||||||
|
|
||||||
name = 'nm-ppp-plugin'
|
name = 'nm-ppp-plugin'
|
||||||
|
|
||||||
deps = [
|
|
||||||
nm_dep,
|
|
||||||
]
|
|
||||||
|
|
||||||
linker_script = join_paths(meson.current_source_dir(), 'nm-ppp-plugin.ver')
|
linker_script = join_paths(meson.current_source_dir(), 'nm-ppp-plugin.ver')
|
||||||
|
|
||||||
core_plugins += shared_module(
|
core_plugins += shared_module(
|
||||||
name,
|
name,
|
||||||
sources: 'nm-ppp-manager.c',
|
sources: 'nm-ppp-manager.c',
|
||||||
dependencies: deps,
|
dependencies: daemon_nm_default_dep,
|
||||||
link_args: [
|
c_args: daemon_c_flags,
|
||||||
'-Wl,--version-script,@0@'.format(linker_script),
|
link_args: '-Wl,--version-script,@0@'.format(linker_script),
|
||||||
],
|
|
||||||
link_depends: linker_script,
|
link_depends: linker_script,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: nm_plugindir,
|
install_dir: nm_plugindir,
|
||||||
|
@@ -25,23 +25,24 @@ core_sources = files(
|
|||||||
'shvar.c',
|
'shvar.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
deps = [
|
|
||||||
nm_dep,
|
|
||||||
]
|
|
||||||
|
|
||||||
libnms_ifcfg_rh_core = static_library(
|
libnms_ifcfg_rh_core = static_library(
|
||||||
'nms-ifcfg-rh-core',
|
'nms-ifcfg-rh-core',
|
||||||
sources: core_sources,
|
sources: core_sources,
|
||||||
dependencies: deps,
|
dependencies: daemon_nm_default_dep,
|
||||||
|
c_args: daemon_c_flags,
|
||||||
)
|
)
|
||||||
|
|
||||||
sources = [dbus_sources] + core_sources + files('nms-ifcfg-rh-storage.c', 'nms-ifcfg-rh-plugin.c')
|
sources = [dbus_sources] + core_sources + files(
|
||||||
|
'nms-ifcfg-rh-storage.c',
|
||||||
|
'nms-ifcfg-rh-plugin.c',
|
||||||
|
)
|
||||||
|
|
||||||
libnm_settings_plugin_ifcfg_rh = shared_module(
|
libnm_settings_plugin_ifcfg_rh = shared_module(
|
||||||
'nm-settings-plugin-ifcfg-rh',
|
'nm-settings-plugin-ifcfg-rh',
|
||||||
sources: sources,
|
sources: sources,
|
||||||
dependencies: deps,
|
dependencies: daemon_nm_default_dep,
|
||||||
link_with: [libnms_ifcfg_rh_core],
|
c_args: daemon_c_flags,
|
||||||
|
link_with: libnms_ifcfg_rh_core,
|
||||||
link_args: ldflags_linker_script_settings,
|
link_args: ldflags_linker_script_settings,
|
||||||
link_depends: linker_script_settings,
|
link_depends: linker_script_settings,
|
||||||
install: true,
|
install: true,
|
||||||
@@ -50,27 +51,17 @@ libnm_settings_plugin_ifcfg_rh = shared_module(
|
|||||||
|
|
||||||
core_plugins += libnm_settings_plugin_ifcfg_rh
|
core_plugins += libnm_settings_plugin_ifcfg_rh
|
||||||
|
|
||||||
# FIXME: check_so_symbols replacement
|
data = [
|
||||||
'''
|
'nm-ifdown',
|
||||||
run_target(
|
'nm-ifup',
|
||||||
'check-local-symbols-settings-ifcfg-rh',
|
]
|
||||||
command: [check_so_symbols, libnm_settings_plugin_ifcfg_rh.full_path()],
|
|
||||||
depends: libnm_settings_plugin_ifcfg_rh,
|
|
||||||
)
|
|
||||||
|
|
||||||
check-local-symbols-settings-ifcfg-rh: src/settings/plugins/ifcfg-rh/libnm-settings-plugin-ifcfg-rh.la
|
|
||||||
$(call check_so_symbols,$(builddir)/src/settings/plugins/ifcfg-rh/.libs/libnm-settings-plugin-ifcfg-rh.so)
|
|
||||||
'''
|
|
||||||
|
|
||||||
install_data(
|
install_data(
|
||||||
['nm-ifup', 'nm-ifdown'],
|
data,
|
||||||
install_dir: nm_libexecdir,
|
install_dir: nm_libexecdir,
|
||||||
install_mode: 'rwxr-xr-x',
|
install_mode: 'rwxr-xr-x',
|
||||||
)
|
)
|
||||||
|
|
||||||
meson.add_install_script('sh', '-c',
|
|
||||||
'mkdir -p $DESTDIR/@0@/sysconfig/network-scripts'.format(nm_sysconfdir))
|
|
||||||
|
|
||||||
if enable_tests
|
if enable_tests
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
endif
|
endif
|
||||||
|
@@ -1,11 +1,10 @@
|
|||||||
test_unit = 'test-ifcfg-rh'
|
test_unit = 'test-ifcfg-rh'
|
||||||
|
|
||||||
test_ifcfg_dir = meson.current_source_dir()
|
|
||||||
|
|
||||||
exe = executable(
|
exe = executable(
|
||||||
test_unit,
|
test_unit,
|
||||||
test_unit + '.c',
|
test_unit + '.c',
|
||||||
dependencies: test_nm_dep,
|
dependencies: libnetwork_manager_test_dep,
|
||||||
|
c_args: test_c_flags,
|
||||||
link_with: libnms_ifcfg_rh_core,
|
link_with: libnms_ifcfg_rh_core,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -3,25 +3,18 @@ sources = files(
|
|||||||
'nms-ifupdown-parser.c',
|
'nms-ifupdown-parser.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
deps = [
|
|
||||||
libudev_dep,
|
|
||||||
nm_dep,
|
|
||||||
]
|
|
||||||
|
|
||||||
libnms_ifupdown_core = static_library(
|
libnms_ifupdown_core = static_library(
|
||||||
'nms-ifupdown-core',
|
'nms-ifupdown-core',
|
||||||
sources: sources,
|
sources: sources,
|
||||||
dependencies: deps,
|
dependencies: daemon_nm_default_dep,
|
||||||
)
|
c_args: daemon_c_flags,
|
||||||
|
|
||||||
sources = files(
|
|
||||||
'nms-ifupdown-plugin.c',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
libnm_settings_plugin_ifupdown = shared_module(
|
libnm_settings_plugin_ifupdown = shared_module(
|
||||||
'nm-settings-plugin-ifupdown',
|
'nm-settings-plugin-ifupdown',
|
||||||
sources: sources,
|
sources: 'nms-ifupdown-plugin.c',
|
||||||
dependencies: deps,
|
dependencies: daemon_nm_default_dep,
|
||||||
|
c_args: daemon_c_flags,
|
||||||
link_with: libnms_ifupdown_core,
|
link_with: libnms_ifupdown_core,
|
||||||
link_args: ldflags_linker_script_settings,
|
link_args: ldflags_linker_script_settings,
|
||||||
link_depends: linker_script_settings,
|
link_depends: linker_script_settings,
|
||||||
@@ -31,18 +24,6 @@ libnm_settings_plugin_ifupdown = shared_module(
|
|||||||
|
|
||||||
core_plugins += libnm_settings_plugin_ifupdown
|
core_plugins += libnm_settings_plugin_ifupdown
|
||||||
|
|
||||||
# FIXME: check_so_symbols replacement
|
|
||||||
'''
|
|
||||||
run_target(
|
|
||||||
'check-local-symbols-settings-ifupdown',
|
|
||||||
command: [check_so_symbols, libnm_settings_plugin_ifupdown.full_path()],
|
|
||||||
depends: libnm_settings_plugin_ifupdown,
|
|
||||||
)
|
|
||||||
|
|
||||||
check-local-symbols-settings-ifupdown: src/settings/plugins/ifupdown/libnm-settings-plugin-ifupdown.la
|
|
||||||
$(call check_so_symbols,$(builddir)/src/settings/plugins/ifupdown/.libs/libnm-settings-plugin-ifupdown.so)
|
|
||||||
'''
|
|
||||||
|
|
||||||
if enable_tests
|
if enable_tests
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
endif
|
endif
|
||||||
|
@@ -3,7 +3,8 @@ test_unit = 'test-ifupdown'
|
|||||||
exe = executable(
|
exe = executable(
|
||||||
test_unit,
|
test_unit,
|
||||||
test_unit + '.c',
|
test_unit + '.c',
|
||||||
dependencies: test_nm_dep,
|
dependencies: libnetwork_manager_test_dep,
|
||||||
|
c_args: test_c_flags,
|
||||||
link_with: libnms_ifupdown_core,
|
link_with: libnms_ifupdown_core,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -3,7 +3,8 @@ test_unit = 'test-keyfile-settings'
|
|||||||
exe = executable(
|
exe = executable(
|
||||||
test_unit,
|
test_unit,
|
||||||
test_unit + '.c',
|
test_unit + '.c',
|
||||||
dependencies: test_nm_dep,
|
dependencies: libnetwork_manager_test_dep,
|
||||||
|
c_args: test_c_flags,
|
||||||
)
|
)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
|
@@ -3,7 +3,8 @@ test_unit = 'test-supplicant-config'
|
|||||||
exe = executable(
|
exe = executable(
|
||||||
test_unit,
|
test_unit,
|
||||||
test_unit + '.c',
|
test_unit + '.c',
|
||||||
dependencies: test_nm_dep,
|
dependencies: libnetwork_manager_test_dep,
|
||||||
|
c_args: test_c_flags,
|
||||||
)
|
)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
libnm_systemd_core = static_library(
|
sources = files(
|
||||||
'nm-systemd-core',
|
|
||||||
sources: files(
|
|
||||||
'sd-adapt-core/nm-sd-adapt-core.c',
|
|
||||||
'src/libsystemd-network/arp-util.c',
|
'src/libsystemd-network/arp-util.c',
|
||||||
'src/libsystemd-network/dhcp-identifier.c',
|
'src/libsystemd-network/dhcp-identifier.c',
|
||||||
'src/libsystemd-network/dhcp-network.c',
|
'src/libsystemd-network/dhcp-network.c',
|
||||||
@@ -26,20 +23,26 @@ libnm_systemd_core = static_library(
|
|||||||
'nm-sd.c',
|
'nm-sd.c',
|
||||||
'nm-sd-utils-core.c',
|
'nm-sd-utils-core.c',
|
||||||
'nm-sd-utils-dhcp.c',
|
'nm-sd-utils-dhcp.c',
|
||||||
),
|
'sd-adapt-core/nm-sd-adapt-core.c',
|
||||||
include_directories: [
|
)
|
||||||
src_inc,
|
|
||||||
include_directories(
|
incs = include_directories(
|
||||||
'sd-adapt-core',
|
'sd-adapt-core',
|
||||||
'src/libsystemd-network',
|
'src/libsystemd-network',
|
||||||
'src/libsystemd/sd-event',
|
'src/libsystemd/sd-event',
|
||||||
'src/systemd',
|
'src/systemd',
|
||||||
)
|
)
|
||||||
],
|
|
||||||
dependencies: [
|
deps = [
|
||||||
libnm_core_dep,
|
daemon_nm_default_dep,
|
||||||
],
|
libnm_systemd_shared_dep,
|
||||||
c_args: [
|
]
|
||||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD',
|
|
||||||
],
|
libnm_systemd_core = static_library(
|
||||||
|
'nm-systemd-core',
|
||||||
|
sources: sources,
|
||||||
|
include_directories: incs,
|
||||||
|
dependencies: deps,
|
||||||
|
c_args: '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD',
|
||||||
|
link_with: libc_siphash,
|
||||||
)
|
)
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
test_config_dir = meson.current_source_dir()
|
||||||
|
|
||||||
test_unit = 'test-config'
|
test_unit = 'test-config'
|
||||||
|
|
||||||
sources = files(
|
sources = files(
|
||||||
@@ -5,12 +7,11 @@ sources = files(
|
|||||||
'test-config.c',
|
'test-config.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
test_config_dir = meson.current_source_dir()
|
|
||||||
|
|
||||||
exe = executable(
|
exe = executable(
|
||||||
test_unit,
|
test_unit,
|
||||||
sources,
|
sources,
|
||||||
dependencies: test_nm_dep,
|
dependencies: libnetwork_manager_test_dep,
|
||||||
|
c_args: test_c_flags,
|
||||||
)
|
)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
|
@@ -14,7 +14,8 @@ foreach test_unit: test_units
|
|||||||
exe = executable(
|
exe = executable(
|
||||||
test_unit,
|
test_unit,
|
||||||
test_unit + '.c',
|
test_unit + '.c',
|
||||||
dependencies: test_nm_dep,
|
dependencies: libnetwork_manager_test_dep,
|
||||||
|
c_args: test_c_flags,
|
||||||
)
|
)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
@@ -27,21 +28,22 @@ endforeach
|
|||||||
|
|
||||||
test_unit = 'test-systemd'
|
test_unit = 'test-systemd'
|
||||||
|
|
||||||
cflags = [
|
c_flags = [
|
||||||
'-DNETWORKMANAGER_COMPILATION_TEST',
|
'-DNETWORKMANAGER_COMPILATION_TEST',
|
||||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD',
|
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
links = [
|
||||||
|
libnm_systemd_core,
|
||||||
|
libnm_systemd_shared,
|
||||||
|
]
|
||||||
|
|
||||||
exe = executable(
|
exe = executable(
|
||||||
test_unit,
|
test_unit,
|
||||||
test_unit + '.c',
|
test_unit + '.c',
|
||||||
include_directories: src_inc,
|
dependencies: daemon_nm_default_dep,
|
||||||
dependencies: libnm_core_dep,
|
c_args: c_flags,
|
||||||
c_args: cflags,
|
link_with: links,
|
||||||
link_with: [
|
|
||||||
libnm_systemd_core,
|
|
||||||
libnm_systemd_shared,
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
test(
|
test(
|
||||||
|
@@ -49,3 +49,7 @@ if [ "$6" = install_docs ]; then
|
|||||||
ln -f "${DESTDIR}${mandir}/man5/NetworkManager.conf.5" "${DESTDIR}${mandir}/man5/nm-system-settings.conf.5"
|
ln -f "${DESTDIR}${mandir}/man5/NetworkManager.conf.5" "${DESTDIR}${mandir}/man5/nm-system-settings.conf.5"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$8" = create_network_scripts ]; then
|
||||||
|
sysconfdir=$9
|
||||||
|
mkdir -p "${DESTDIR}${sysconfdir}/sysconfig/network-scripts"
|
||||||
|
fi
|
||||||
|
Reference in New Issue
Block a user