From 4e85fdcdb77b050e4d02eedd76be0ef4404ca53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1igo=20Mart=C3=ADnez?= Date: Wed, 11 Sep 2019 09:16:58 +0200 Subject: [PATCH] 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. --- dispatcher/meson.build | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/dispatcher/meson.build b/dispatcher/meson.build index e0559422ae..bd27e49b20 100644 --- a/dispatcher/meson.build +++ b/dispatcher/meson.build @@ -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,