Commit 284ac92e authored by Thomas Haller's avatar Thomas Haller

shared: build helper "libnm-libnm-core-{intern|aux}.la" library for libnm-core

"libnm-core" implements common functionality for "NetworkManager" and
"libnm".

Note that clients like "nmcli" cannot access the internal API provided
by "libnm-core". So, if nmcli wants to do something that is also done by
"libnm-core", , "libnm", or "NetworkManager", the code would have to be
duplicated.

Instead, such code can be in "libnm-libnm-core-{intern|aux}.la".
Note that:

  0) "libnm-libnm-core-intern.la" is used by libnm-core itsself.
     On the other hand, "libnm-libnm-core-aux.la" is not used by
     libnm-core, but provides utilities on top of it.

  1) they both extend "libnm-core" with utlities that are not public
     API of libnm itself. Maybe part of the code should one day become
     public API of libnm. On the other hand, this is code for which
     we may not want to commit to a stable interface or which we
     don't want to provide as part of the API.

  2) "libnm-libnm-core-intern.la" is statically linked by "libnm-core"
     and thus directly available to "libnm" and "NetworkManager".
     On the other hand, "libnm-libnm-core-aux.la" may be used by "libnm"
     and "NetworkManager".
     Both libraries may be statically linked by libnm clients (like
     nmcli).

  3) it must only use glib, libnm-glib-aux.la, and the public API
     of libnm-core.
     This is important: it must not use "libnm-core/nm-core-internal.h"
     nor "libnm-core/nm-utils-private.h" so the static library is usable
     by nmcli which couldn't access these.

Note that "shared/nm-meta-setting.c" is an entirely different case,
because it behaves differently depending on whether linking against
"libnm-core" or the client programs. As such, this file must be compiled
twice.

(cherry picked from commit af07ed01)
parent 87f7e684
......@@ -398,6 +398,74 @@ shared_nm_udev_aux_libnm_udev_aux_la_LIBADD = \
###############################################################################
noinst_LTLIBRARIES += shared/nm-libnm-core-intern/libnm-libnm-core-intern.la
shared_nm_libnm_core_intern_libnm_libnm_core_intern_la_CPPFLAGS = \
$(dflt_cppflags) \
-I$(srcdir)/shared \
-I$(builddir)/shared \
-I$(srcdir)/libnm-core \
-I$(builddir)/libnm-core \
$(CODE_COVERAGE_CFLAGS) \
$(GLIB_CFLAGS) \
$(SANITIZER_LIB_CFLAGS) \
-DG_LOG_DOMAIN=\""libnm"\" \
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE \
$(NULL)
shared_nm_libnm_core_intern_libnm_libnm_core_intern_la_SOURCES = \
shared/nm-libnm-core-intern/nm-common-macros.h \
shared/nm-libnm-core-intern/nm-ethtool-utils.c \
shared/nm-libnm-core-intern/nm-ethtool-utils.h \
shared/nm-libnm-core-intern/nm-libnm-core-utils.c \
shared/nm-libnm-core-intern/nm-libnm-core-utils.h \
$(NULL)
shared_nm_libnm_core_intern_libnm_libnm_core_intern_la_LDFLAGS = \
$(CODE_COVERAGE_LDFLAGS) \
$(SANITIZER_LIB_LDFLAGS) \
$(NULL)
shared_nm_libnm_core_intern_libnm_libnm_core_intern_la_LIBADD = \
$(GLIB_LIBS) \
$(NULL)
$(shared_nm_libnm_core_intern_libnm_libnm_core_intern_la_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
###############################################################################
noinst_LTLIBRARIES += shared/nm-libnm-core-aux/libnm-libnm-core-aux.la
shared_nm_libnm_core_aux_libnm_libnm_core_aux_la_CPPFLAGS = \
$(dflt_cppflags) \
-I$(srcdir)/shared \
-I$(builddir)/shared \
-I$(srcdir)/libnm-core \
-I$(builddir)/libnm-core \
$(CODE_COVERAGE_CFLAGS) \
$(GLIB_CFLAGS) \
$(SANITIZER_LIB_CFLAGS) \
-DG_LOG_DOMAIN=\""libnm"\" \
-DNETWORKMANAGER_COMPILATION='(NM_NETWORKMANAGER_COMPILATION_WITH_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)' \
$(NULL)
shared_nm_libnm_core_aux_libnm_libnm_core_aux_la_SOURCES = \
shared/nm-libnm-core-aux/nm-dispatcher-api.h \
$(NULL)
shared_nm_libnm_core_aux_libnm_libnm_core_aux_la_LDFLAGS = \
$(CODE_COVERAGE_LDFLAGS) \
$(SANITIZER_LIB_LDFLAGS) \
$(NULL)
shared_nm_libnm_core_aux_libnm_libnm_core_aux_la_LIBADD = \
$(GLIB_LIBS) \
$(NULL)
$(shared_nm_libnm_core_aux_libnm_libnm_core_aux_la_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
###############################################################################
check_programs += shared/nm-utils/tests/test-shared-general
shared_nm_utils_tests_test_shared_general_CPPFLAGS = \
......@@ -725,8 +793,6 @@ libnm_core_lib_h_pub_real = \
libnm_core_lib_h_pub_mkenums = \
libnm-core/nm-core-enum-types.h
libnm_core_lib_h_priv = \
shared/nm-ethtool-utils.h \
shared/nm-libnm-core-utils.h \
shared/nm-meta-setting.h \
libnm-core/nm-crypto.h \
libnm-core/nm-crypto-impl.h \
......@@ -788,8 +854,6 @@ libnm_core_lib_c_settings_real = \
libnm-core/nm-setting-wpan.c
libnm_core_lib_c_real = \
$(libnm_core_lib_c_settings_real) \
shared/nm-ethtool-utils.c \
shared/nm-libnm-core-utils.c \
shared/nm-meta-setting.c \
libnm-core/nm-crypto.c \
libnm-core/nm-connection.c \
......@@ -990,22 +1054,28 @@ libnm_core_tests_test_settings_defaults_CPPFLAGS = $(libnm_core_tests_cppflags)
libnm_core_tests_test_general_SOURCES = \
libnm-core/tests/test-general-enums.h \
libnm-core/tests/test-general.c
libnm-core/tests/test-general.c \
$(NULL)
nodist_libnm_core_tests_test_general_SOURCES = \
libnm-core/tests/nm-core-tests-enum-types.c \
libnm-core/tests/nm-core-tests-enum-types.h
libnm-core/tests/nm-core-tests-enum-types.h \
$(NULL)
libnm_core_tests_ldadd = \
shared/nm-libnm-core-aux/libnm-libnm-core-aux.la \
libnm-core/libnm-core.la \
$(libnm_crypto_lib) \
shared/nm-libnm-core-intern/libnm-libnm-core-intern.la \
shared/systemd/libnm-systemd-shared.la \
shared/systemd/libnm-systemd-logging-stub.la \
shared/nm-glib-aux/libnm-glib-aux.la \
$(libnm_crypto_lib) \
$(GLIB_LIBS)
$(GLIB_LIBS) \
$(NULL)
libnm_core_tests_ldflags = \
$(SANITIZER_EXEC_LDFLAGS)
$(SANITIZER_EXEC_LDFLAGS) \
$(NULL)
libnm_core_tests_test_compare_LDADD = $(libnm_core_tests_ldadd)
libnm_core_tests_test_crypto_LDADD = $(libnm_core_tests_ldadd)
......@@ -1209,8 +1279,10 @@ libnm_libnm_utils_la_SOURCES = \
libnm/nm-libnm-utils.c
libnm_libnm_utils_la_LIBADD = \
shared/nm-libnm-core-aux/libnm-libnm-core-aux.la \
libnm-core/libnm-core.la \
$(libnm_crypto_lib) \
shared/nm-libnm-core-intern/libnm-libnm-core-intern.la \
introspection/libnmdbus.la \
shared/nm-glib-aux/libnm-glib-aux.la \
$(GLIB_LIBS) \
......@@ -1458,9 +1530,6 @@ libnm_tests_test_general_LDADD = \
libnm/libnm-utils.la \
$(libnm_tests_ldadd)
libnm_tests_test_general_LDFLAGS = \
$(libnm_tests_ldflags)
libnm_tests_test_nm_client_LDADD = $(libnm_tests_ldadd)
libnm_tests_test_remote_settings_client_LDADD = $(libnm_tests_ldadd)
libnm_tests_test_secret_agent_LDADD = $(libnm_tests_ldadd)
......@@ -1895,8 +1964,10 @@ src_libNetworkManagerBase_la_SOURCES += \
endif
src_libNetworkManagerBase_la_LIBADD = \
shared/nm-libnm-core-aux/libnm-libnm-core-aux.la \
libnm-core/libnm-core.la \
$(libnm_crypto_lib) \
shared/nm-libnm-core-intern/libnm-libnm-core-intern.la \
shared/nm-udev-aux/libnm-udev-aux.la \
shared/nm-glib-aux/libnm-glib-aux.la \
$(GLIB_LIBS) \
......@@ -2201,7 +2272,6 @@ src_initrd_nm_initrd_generator_SOURCES = \
src/initrd/nm-initrd-generator.c
src_initrd_nm_initrd_generator_LDADD = \
libnm-core/libnm-core.la \
src/initrd/libnmi-core.la \
src/libNetworkManagerBase.la \
shared/systemd/libnm-systemd-shared.la \
......@@ -2225,7 +2295,6 @@ src_initrd_tests_test_ibft_reader_LDFLAGS = \
$(SANITIZER_EXEC_LDFLAGS)
src_initrd_tests_test_ibft_reader_LDADD = \
libnm-core/libnm-core.la \
src/initrd/libnmi-core.la \
src/libNetworkManagerTest.la \
shared/nm-glib-aux/libnm-glib-aux.la \
......@@ -2441,7 +2510,6 @@ src_initrd_tests_test_cmdline_reader_LDFLAGS = \
$(SANITIZER_EXEC_LDFLAGS)
src_initrd_tests_test_cmdline_reader_LDADD = \
libnm-core/libnm-core.la \
src/initrd/libnmi-core.la \
src/libNetworkManagerTest.la \
shared/nm-glib-aux/libnm-glib-aux.la \
......@@ -3816,9 +3884,9 @@ $(dispatcher_nm_dispatcher_OBJECTS): $(dispatcher_nmdbus_dispatcher_sources)
CLEANFILES += $(dispatcher_nmdbus_dispatcher_sources)
dispatcher_libnm_dispatcher_core_la_SOURCES = \
shared/nm-dispatcher-api.h \
dispatcher/nm-dispatcher-utils.c \
dispatcher/nm-dispatcher-utils.h
dispatcher/nm-dispatcher-utils.h \
$(NULL)
dispatcher_libnm_dispatcher_core_la_CPPFLAGS = $(dispatcher_cppflags)
......@@ -3827,8 +3895,8 @@ dispatcher_libnm_dispatcher_core_la_LIBADD = \
$(GLIB_LIBS)
dispatcher_nm_dispatcher_SOURCES = \
shared/nm-dispatcher-api.h \
dispatcher/nm-dispatcher.c
dispatcher/nm-dispatcher.c \
$(NULL)
nodist_dispatcher_nm_dispatcher_SOURCES = $(dispatcher_nmdbus_dispatcher_sources)
......@@ -4018,11 +4086,6 @@ clients_common_libnmc_la_SOURCES = \
shared/nm-meta-setting.c \
shared/nm-meta-setting.h \
\
shared/nm-ethtool-utils.c \
shared/nm-ethtool-utils.h \
shared/nm-libnm-core-utils.c \
shared/nm-libnm-core-utils.h \
\
clients/common/nm-meta-setting-desc.c \
clients/common/nm-meta-setting-desc.h \
clients/common/nm-meta-setting-access.c \
......@@ -4035,8 +4098,10 @@ clients_common_libnmc_la_CPPFLAGS = \
$(NULL)
clients_common_libnmc_la_LIBADD = \
libnm/libnm.la \
clients/common/libnmc-base.la \
libnm/libnm.la \
shared/nm-libnm-core-aux/libnm-libnm-core-aux.la \
shared/nm-libnm-core-intern/libnm-libnm-core-intern.la \
$(GLIB_LIBS)
$(clients_common_libnmc_la_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
......@@ -5311,9 +5376,7 @@ EXTRA_DIST += \
\
po/meson.build \
\
shared/nm-common-macros.h \
shared/nm-default.h \
shared/nm-dispatcher-api.h \
shared/nm-test-libnm-utils.h \
shared/nm-test-utils-impl.c \
shared/nm-utils/nm-compat.c \
......
......@@ -23,7 +23,7 @@
#include <stdlib.h>
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
#include "nm-client-utils.h"
......
......@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <arpa/inet.h>
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
#include "nm-client-utils.h"
#include "nm-vpn-helpers.h"
......
......@@ -4,7 +4,7 @@ nm_polkit_listener = files('nm-polkit-listener.c')
deps = [
libnm_dep,
nm_core_dep,
shared_nm_libnm_core_aux_dep,
]
cflags = clients_cflags + [
......@@ -55,7 +55,7 @@ libnmc = static_library(
sources: files(
'nm-meta-setting-access.c',
'nm-meta-setting-desc.c',
) + shared_nm_meta_setting_c + shared_nm_ethtool_utils_c + shared_nm_libnm_core_utils_c + [settings_docs_source],
) + shared_nm_meta_setting_c + [settings_docs_source],
dependencies: deps,
c_args: cflags,
link_with: libnmc_base,
......
......@@ -23,7 +23,7 @@
#include "nm-meta-setting.h"
#include "nm-active-connection.h"
#include "nm-device.h"
#include "nm-libnm-core-utils.h"
#include "nm-libnm-core-intern/nm-libnm-core-utils.h"
const NMObject **nmc_objects_sort_by_path (const NMObject *const*objs, gssize len);
......
......@@ -24,10 +24,10 @@
#include <stdlib.h>
#include <arpa/inet.h>
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
#include "nm-glib-aux/nm-enum-utils.h"
#include "nm-glib-aux/nm-secret-utils.h"
#include "nm-libnm-core-utils.h"
#include "nm-libnm-core-intern/nm-libnm-core-utils.h"
#include "nm-vpn-helpers.h"
#include "nm-client-utils.h"
......
......@@ -22,7 +22,7 @@
#include "nm-glib-aux/nm-obj.h"
#include "nm-meta-setting.h"
#include "nm-ethtool-utils.h"
#include "nm-libnm-core-intern/nm-ethtool-utils.h"
struct _NMDevice;
......
......@@ -30,7 +30,7 @@
#include "nmt-mac-entry.h"
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
G_DEFINE_TYPE (NmtMacEntry, nmt_mac_entry, NMT_TYPE_NEWT_ENTRY)
......
......@@ -28,7 +28,7 @@
#include "nm-setting-ip6-config.h"
#include "nm-setting-connection.h"
#include "nm-dispatcher-api.h"
#include "nm-libnm-core-aux/nm-dispatcher-api.h"
#include "nm-utils.h"
/*****************************************************************************/
......
......@@ -31,7 +31,7 @@
#include <arpa/inet.h>
#include <glib-unix.h>
#include "nm-dispatcher-api.h"
#include "nm-libnm-core-aux/nm-dispatcher-api.h"
#include "nm-dispatcher-utils.h"
#include "nmdbus-dispatcher.h"
......
......@@ -24,7 +24,7 @@
#include <stdlib.h>
#include "nm-dispatcher-utils.h"
#include "nm-dispatcher-api.h"
#include "nm-libnm-core-aux/nm-dispatcher-api.h"
#include "nm-utils/nm-test-utils.h"
......
......@@ -139,6 +139,48 @@ libnm_core_enum = gnome.mkenums(
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 = [
dl_dep,
libudev_dep,
......@@ -147,6 +189,7 @@ deps = [
shared_c_siphash_dep,
shared_nm_glib_aux_dep,
shared_nm_udev_aux_dep,
shared_nm_libnm_core_intern_dep,
]
cflags = [
......@@ -188,8 +231,6 @@ 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 += shared_nm_ethtool_utils_c
libnm_core_sources_all += shared_nm_libnm_core_utils_c
libnm_core_sources_all += [version_header]
libnm_core = static_library(
......@@ -204,12 +245,50 @@ nm_core_dep = declare_dependency(
sources: libnm_core_enum[1],
include_directories: libnm_core_inc,
dependencies: [
shared_nm_libnm_core_intern_dep,
shared_nm_glib_aux_dep,
shared_c_siphash_dep,
libnm_systemd_shared_dep,
],
)
###############################################################################
shared_nm_libnm_core_aux = static_library(
'nm-libnm-core-aux',
sources: files('../shared/nm-libnm-core-aux/nm-dispatcher-api.h'),
c_args: [
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_WITH_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)',
],
include_directories: [
top_inc,
shared_inc,
libnm_core_inc,
],
dependencies: [
glib_dep,
shared_c_siphash_dep,
shared_nm_glib_aux_dep,
],
)
shared_nm_libnm_core_aux_dep = declare_dependency(
link_with: shared_nm_libnm_core_aux,
include_directories: [
top_inc,
shared_inc,
],
dependencies: [
nm_core_dep,
glib_dep,
shared_nm_glib_aux_dep,
libnm_systemd_shared_dep,
],
)
###############################################################################
enums_to_docbook = join_paths(meson.source_root(), 'tools', 'enums-to-docbook.pl')
docbooks = [
......@@ -234,6 +313,8 @@ foreach docbook: docbooks
content_files += xml.full_path()
endforeach
###############################################################################
if enable_tests
subdir('tests')
endif
......@@ -88,7 +88,7 @@
#include "nm-utils.h"
#include "nm-vpn-dbus-interface.h"
#include "nm-vpn-editor-plugin.h"
#include "nm-libnm-core-utils.h"
#include "nm-libnm-core-intern/nm-libnm-core-utils.h"
/* IEEE 802.1D-1998 timer values */
#define NM_BR_MIN_HELLO_TIME 1
......
......@@ -33,7 +33,7 @@
#include "nm-glib-aux/nm-secret-utils.h"
#include "systemd/nm-sd-utils-shared.h"
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
#include "nm-core-internal.h"
#include "nm-keyfile-utils.h"
......
......@@ -24,7 +24,7 @@
#include "nm-setting-ethtool.h"
#include "nm-setting-private.h"
#include "nm-ethtool-utils.h"
#include "nm-libnm-core-intern/nm-ethtool-utils.h"
/*****************************************************************************/
......
......@@ -25,7 +25,7 @@
#include <stdlib.h>
#include "nm-libnm-core-utils.h"
#include "nm-libnm-core-intern/nm-libnm-core-utils.h"
#include "nm-utils.h"
#include "nm-core-types-internal.h"
#include "nm-setting-connection.h"
......
......@@ -24,7 +24,7 @@
#include <net/ethernet.h>
#include "nm-utils.h"
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
#include "nm-utils-private.h"
#include "nm-setting-private.h"
......
......@@ -27,7 +27,7 @@
#include <net/ethernet.h>
#include "nm-utils.h"
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
#include "nm-utils-private.h"
#include "nm-setting-private.h"
......
......@@ -27,7 +27,7 @@
#include <net/ethernet.h>
#include "nm-utils.h"
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
#include "nm-utils-private.h"
#include "nm-setting-private.h"
......
......@@ -40,7 +40,7 @@
#include "nm-glib-aux/nm-enum-utils.h"
#include "nm-glib-aux/nm-secret-utils.h"
#include "systemd/nm-sd-utils-shared.h"
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
#include "nm-utils-private.h"
#include "nm-setting-private.h"
#include "nm-crypto.h"
......
......@@ -64,7 +64,7 @@
#include "nm-simple-connection.h"
#include "nm-keyfile-internal.h"
#include "nm-glib-aux/nm-dedup-multi.h"
#include "nm-ethtool-utils.h"
#include "nm-libnm-core-intern/nm-ethtool-utils.h"
#include "test-general-enums.h"
......
......@@ -27,7 +27,7 @@
#include <string.h>
#include "nm-utils.h"
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
#include "nm-device-ethernet.h"
#include "nm-device-wifi.h"
......
......@@ -25,7 +25,7 @@
#include "nm-utils.h"
#include "nm-checkpoint.h"
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
#include "nm-device-ethernet.h"
#include "nm-device-wifi.h"
#include "nm-core-internal.h"
......
......@@ -80,10 +80,6 @@ version_header = configure_file(
configuration: version_conf,
)
shared_nm_ethtool_utils_c = files('nm-ethtool-utils.c')
shared_nm_libnm_core_utils_c = files('nm-libnm-core-utils.c')
shared_nm_meta_setting_c = files('nm-meta-setting.c')
shared_nm_test_utils_impl_c = files('nm-test-utils-impl.c')
......@@ -185,24 +181,6 @@ shared_nm_udev_aux_dep = declare_dependency(
###############################################################################
test_shared_general = executable(
'nm-utils/tests/test-shared-general',
[ 'nm-utils/tests/test-shared-general.c', ],
c_args: [
'-DNETWORKMANAGER_COMPILATION_TEST',
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)',
],
dependencies: shared_nm_glib_aux_dep,
link_with: shared_c_siphash,
)
test(
'shared/nm-utils/test-shared-general',
test_script,
args: test_args + [test_shared_general.full_path()]
)
###############################################################################
libnm_systemd_shared = static_library(
'nm-systemd-shared',
sources: files(
......@@ -287,3 +265,21 @@ libnm_systemd_shared_no_logging_dep = declare_dependency(
libnm_systemd_logging_stub,
],
)
###############################################################################
test_shared_general = executable(
'nm-utils/tests/test-shared-general',
[ 'nm-utils/tests/test-shared-general.c', ],
c_args: [
'-DNETWORKMANAGER_COMPILATION_TEST',
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_PROG)',
],
dependencies: shared_nm_glib_aux_dep,
link_with: shared_c_siphash,
)
test(
'shared/nm-utils/test-shared-general',
test_script,
args: test_args + [test_shared_general.full_path()]
)
......@@ -18,6 +18,9 @@
* Copyright (C) 2008 - 2012 Red Hat, Inc.
*/
#ifndef __NM_DISPACHER_API_H__
#define __NM_DISPACHER_API_H__
#define NMD_SCRIPT_DIR_DEFAULT NMCONFDIR "/dispatcher.d"
#define NMD_SCRIPT_DIR_PRE_UP NMD_SCRIPT_DIR_DEFAULT "/pre-up.d"
#define NMD_SCRIPT_DIR_PRE_DOWN NMD_SCRIPT_DIR_DEFAULT "/pre-down.d"
......@@ -59,3 +62,4 @@ typedef enum {
DISPATCH_RESULT_TIMEOUT = 4,
} DispatchResult;
#endif /* __NM_DISPACHER_API_H__ */
......@@ -27,7 +27,7 @@
#include "nm-glib-aux/nm-c-list.h"
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
#include "nm-utils.h"
#include "nm-setting-connection.h"
#include "nm-setting-ip4-config.h"
......
......@@ -40,8 +40,8 @@
#include "nm-glib-aux/nm-dedup-multi.h"
#include "nm-glib-aux/nm-random-utils.h"
#include "nm-ethtool-utils.h"
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-ethtool-utils.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
#include "nm-device-private.h"
#include "NetworkManagerUtils.h"
#include "nm-manager.h"
......
......@@ -22,7 +22,7 @@
#include "nm-device-iwd.h"
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
#include "devices/nm-device.h"
#include "devices/nm-device-private.h"
#include "nm-utils.h"
......
......@@ -28,7 +28,7 @@
#include "nm-device-wifi-p2p.h"
#include "nm-wifi-ap.h"
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
#include "devices/nm-device.h"
#include "devices/nm-device-private.h"
#include "nm-dbus-manager.h"
......
......@@ -22,7 +22,7 @@
#include "nm-active-connection.h"
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
#include "nm-dbus-interface.h"
#include "devices/nm-device.h"
#include "settings/nm-settings-connection.h"
......
......@@ -23,7 +23,7 @@
#include "nm-dispatcher.h"
#include "nm-dispatcher-api.h"
#include "nm-libnm-core-aux/nm-dispatcher-api.h"
#include "NetworkManagerUtils.h"
#include "nm-utils.h"
#include "nm-connectivity.h"
......
......@@ -28,7 +28,7 @@
#include <selinux/selinux.h>
#endif
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
#include "nm-dbus-interface.h"
#include "nm-connection.h"
#include "nm-utils.h"
......
......@@ -29,7 +29,7 @@
#include "nm-glib-aux/nm-c-list.h"
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
#include "nm-dbus-manager.h"
#include "vpn/nm-vpn-manager.h"
#include "devices/nm-device.h"
......
......@@ -35,7 +35,7 @@
#include "nm-utils.h"
#include "nm-setting-wired.h"
#include "nm-ethtool-utils.h"
#include "nm-libnm-core-intern/nm-ethtool-utils.h"
#include "nm-core-utils.h"
......
......@@ -23,7 +23,7 @@
#include "nm-platform.h"
#include "nm-setting-wired.h"
#include "nm-ethtool-utils.h"
#include "nm-libnm-core-intern/nm-ethtool-utils.h"
/*****************************************************************************/
......
......@@ -24,7 +24,7 @@
#include <pwd.h>
#include "nm-common-macros.h"
#include "nm-libnm-core-intern/nm-common-macros.h"
#include "nm-dbus-interface.h"
#include "nm-secret-agent.h"
#include "nm-auth-utils.h"
......