diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2018-01-07 15:39:42 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-01-10 12:20:17 +0100 |
commit | 5e16bcf268b0a88764c06ecdb0d694cff560d201 (patch) | |
tree | 53adb3607e52fc64e0fbaa821c145f00ad6a8dbd /dispatcher | |
parent | 96658d2fd11410b01d11ace62a89899dd7958ee4 (diff) | |
download | NetworkManager-5e16bcf268b0a88764c06ecdb0d694cff560d201.tar.gz |
meson: Improve dependency system
Some targets are missing dependencies on some generated sources in
the meson port. These makes the build to fail due to missing source
files on a highly parallelized build.
These dependencies have been resolved by taking advantage of meson's
internal dependencies which can be used to pass source files,
include directories, libraries and compiler flags.
One of such internal dependencies called `core_dep` was already in
use. However, in order to avoid any confusion with another new
internal dependency called `nm_core_dep`, which is used to include
directories and source files from the `libnm-core` directory, the
`core_dep` dependency has been renamed to `nm_dep`.
These changes have allowed minimizing the build details which are
inherited by using those dependencies. The parallelized build has
also been improved.
Diffstat (limited to 'dispatcher')
-rw-r--r-- | dispatcher/meson.build | 12 | ||||
-rw-r--r-- | dispatcher/tests/meson.build | 11 |
2 files changed, 6 insertions, 17 deletions
diff --git a/dispatcher/meson.build b/dispatcher/meson.build index 03e8d4e92f..c72175bdb7 100644 --- a/dispatcher/meson.build +++ b/dispatcher/meson.build @@ -25,15 +25,9 @@ install_data( sources = files('nm-dispatcher-utils.c') -incs = [ - top_inc, - shared_inc, - libnm_core_inc -] - deps = [ - glib_dep, - libnm_dep + libnm_dep, + nm_core_dep ] cflags = [ @@ -47,7 +41,6 @@ cflags = [ libnm_dispatcher_core = static_library( name + '-core', sources: sources, - include_directories: incs, dependencies: deps, c_args: cflags ) @@ -69,7 +62,6 @@ endif executable( name, sources, - include_directories: incs, dependencies: deps, c_args: cflags, link_with: libnm_dispatcher_core, diff --git a/dispatcher/tests/meson.build b/dispatcher/tests/meson.build index 2224ade58b..8675271c58 100644 --- a/dispatcher/tests/meson.build +++ b/dispatcher/tests/meson.build @@ -1,11 +1,8 @@ test_unit = 'test-dispatcher-envp' incs = [ - top_inc, - shared_inc, - libnm_core_inc, - libnm_inc, - dispatcher_inc + dispatcher_inc, + libnm_inc ] cflags = [ @@ -16,9 +13,9 @@ cflags = [ exe = executable( test_unit, - [test_unit + '.c', libnm_core_enum[1]], + test_unit + '.c', include_directories: incs, - dependencies: glib_dep, + dependencies: nm_core_dep, c_args: cflags, link_with: libnm_dispatcher_core ) |