meson: Avoid the creation of extra variables

Extra variables are used for sources of targets in the `dispatcher`
build file. These have been moved to the `source` parameter because
using them directly avoiding the creation of extra variablse doesn't
hurt readibility.

The compiler flags `cflags` variable has also been renamed to be
consistent with the rest of build files.
This commit is contained in:
Iñigo Martínez 2019-09-11 09:16:58 +02:00 committed by Thomas Haller
parent c5e80a23fe
commit 4e85fdcdb7

View file

@ -20,27 +20,23 @@ install_data(
install_dir: dbus_conf_dir,
)
sources = files('nm-dispatcher-utils.c')
deps = [
libnm_dep,
libnm_nm_default_dep,
]
cflags = [
c_flags = [
'-DG_LOG_DOMAIN="@0@"'.format(name),
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
]
libnm_dispatcher_core = static_library(
name + '-core',
sources: sources,
sources: 'nm-dispatcher-utils.c',
dependencies: deps,
c_args: cflags,
c_args: c_flags,
)
sources = files('nm-dispatcher.c')
nmdbus_dispatcher_sources = gnome.gdbus_codegen(
'nmdbus-dispatcher',
name + '.xml',
@ -50,9 +46,9 @@ nmdbus_dispatcher_sources = gnome.gdbus_codegen(
executable(
name,
sources,
name + '.c',
dependencies: deps,
c_args: cflags,
c_args: c_flags,
link_with: libnm_dispatcher_core,
link_args: ldflags_linker_script_binary,
link_depends: linker_script_binary,