summaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-02-12 15:01:09 +0100
committerThomas Haller <thaller@redhat.com>2021-02-18 19:46:51 +0100
commitfdf9614ba793a023d9b6c0f6a078beded8143771 (patch)
tree1c21d90c0873da541302bc0e209428b667029054 /clients
parent2c1f8e9108a33eb3819b1bda1138a01bfd71746a (diff)
downloadNetworkManager-fdf9614ba793a023d9b6c0f6a078beded8143771.tar.gz
build: move "libnm-core/" to "src/" and split it
"libnm-core/" is rather complicated. It provides a static library that is linked into libnm.so and NetworkManager. It also contains public headers (like "nm-setting.h") which are part of public libnm API. Then we have helper libraries ("libnm-core/nm-libnm-core-*/") which only rely on public API of libnm-core, but are themself static libraries that can be used by anybody who uses libnm-core. And "libnm-core/nm-libnm-core-intern" is used by libnm-core itself. Move "libnm-core/" to "src/". But also split it in different directories so that they have a clearer purpose. The goal is to have a flat directory hierarchy. The "src/libnm-core*/" directories correspond to the different modules (static libraries and set of headers that we have). We have different kinds of such modules because of how we combine various code together. The directory layout now reflects this.
Diffstat (limited to 'clients')
-rw-r--r--clients/cli/general.c2
-rw-r--r--clients/cli/meson.build10
-rw-r--r--clients/cli/settings.c2
-rw-r--r--clients/cloud-setup/main.c2
-rw-r--r--clients/cloud-setup/meson.build6
-rw-r--r--clients/cloud-setup/tests/meson.build3
-rw-r--r--clients/cloud-setup/tests/test-cloud-setup-general.c2
-rw-r--r--clients/common/meson.build2
-rw-r--r--clients/common/nm-client-utils.h2
-rw-r--r--clients/common/nm-meta-setting-desc.c6
-rw-r--r--clients/common/nm-polkit-listener.c2
-rw-r--r--clients/common/tests/meson.build7
-rw-r--r--clients/common/tests/test-libnm-core-aux.c4
-rw-r--r--clients/meson.build1
-rw-r--r--clients/tui/meson.build4
-rw-r--r--clients/tui/nmt-mac-entry.c2
-rw-r--r--clients/tui/nmt-page-bond.c2
17 files changed, 40 insertions, 19 deletions
diff --git a/clients/cli/general.c b/clients/cli/general.c
index 1dae57e116..8094ad7c71 100644
--- a/clients/cli/general.c
+++ b/clients/cli/general.c
@@ -7,7 +7,7 @@
#include <stdlib.h>
-#include "nm-libnm-core-intern/nm-common-macros.h"
+#include "libnm-core-aux-intern/nm-common-macros.h"
#include "nm-client-utils.h"
diff --git a/clients/cli/meson.build b/clients/cli/meson.build
index f8e6a8236d..7bb75d34a5 100644
--- a/clients/cli/meson.build
+++ b/clients/cli/meson.build
@@ -24,8 +24,12 @@ executable(
dependencies: [
libnmc_base_dep,
libnmc_dep,
- readline_dep,
libnm_libnm_aux_dep,
+ libnm_core_aux_extern_dep_link,
+ libnm_core_aux_intern_dep_link,
+ libnm_base_dep_link,
+ libnm_glib_aux_dep_link,
+ readline_dep,
],
c_args: [
'-DG_LOG_DOMAIN="nmcli"',
@@ -46,6 +50,10 @@ generate_docs_nm_settings_nmcli = executable(
libnmc_base_dep,
libnmc_dep,
libnm_libnm_aux_dep,
+ libnm_core_aux_extern_dep_link,
+ libnm_core_aux_intern_dep_link,
+ libnm_base_dep_link,
+ libnm_glib_aux_dep_link,
],
c_args: [
'-DG_LOG_DOMAIN="nmcli"',
diff --git a/clients/cli/settings.c b/clients/cli/settings.c
index 2c1037f222..4de1a37ebf 100644
--- a/clients/cli/settings.c
+++ b/clients/cli/settings.c
@@ -10,7 +10,7 @@
#include <stdlib.h>
#include <arpa/inet.h>
-#include "nm-libnm-core-intern/nm-common-macros.h"
+#include "libnm-core-aux-intern/nm-common-macros.h"
#include "nm-client-utils.h"
#include "nm-vpn-helpers.h"
diff --git a/clients/cloud-setup/main.c b/clients/cloud-setup/main.c
index 065901760a..7cee355d75 100644
--- a/clients/cloud-setup/main.c
+++ b/clients/cloud-setup/main.c
@@ -8,7 +8,7 @@
#include "nmcs-provider-ec2.h"
#include "nmcs-provider-gcp.h"
#include "nmcs-provider-azure.h"
-#include "nm-libnm-core-intern/nm-libnm-core-utils.h"
+#include "libnm-core-aux-intern/nm-libnm-core-utils.h"
/*****************************************************************************/
diff --git a/clients/cloud-setup/meson.build b/clients/cloud-setup/meson.build
index 581dde6a18..debe19f02c 100644
--- a/clients/cloud-setup/meson.build
+++ b/clients/cloud-setup/meson.build
@@ -53,11 +53,13 @@ executable(
'main.c',
),
dependencies: [
+ libnm_cloud_setup_core_dep,
libnmc_base_dep,
libnmc_dep,
+ libnm_core_aux_intern_dep_link,
+ libnm_core_aux_extern_dep_link,
+ libnm_glib_aux_dep_link,
libcurl_dep,
- libnm_libnm_aux_dep,
- libnm_cloud_setup_core_dep,
],
c_args: [
'-DG_LOG_DOMAIN="nm-cloud-setup"',
diff --git a/clients/cloud-setup/tests/meson.build b/clients/cloud-setup/tests/meson.build
index 1c5e6ec667..976437af9a 100644
--- a/clients/cloud-setup/tests/meson.build
+++ b/clients/cloud-setup/tests/meson.build
@@ -4,9 +4,10 @@ exe = executable(
'test-cloud-setup-general',
'test-cloud-setup-general.c',
dependencies: [
+ libnm_cloud_setup_core_dep,
libnmc_base_dep,
libnmc_dep,
- libnm_cloud_setup_core_dep,
+ libnm_glib_aux_dep_link,
],
c_args: [
'-DG_LOG_DOMAIN="test"',
diff --git a/clients/cloud-setup/tests/test-cloud-setup-general.c b/clients/cloud-setup/tests/test-cloud-setup-general.c
index 63f3c13d59..e7d898e0e4 100644
--- a/clients/cloud-setup/tests/test-cloud-setup-general.c
+++ b/clients/cloud-setup/tests/test-cloud-setup-general.c
@@ -3,7 +3,7 @@
#include "libnm/nm-default-client.h"
#include "nm-cloud-setup-utils.h"
-#include "nm-libnm-core-intern/nm-libnm-core-utils.h"
+#include "libnm-core-aux-intern/nm-libnm-core-utils.h"
#include "nm-utils/nm-test-utils.h"
diff --git a/clients/common/meson.build b/clients/common/meson.build
index 6b91f36ff0..260df35b68 100644
--- a/clients/common/meson.build
+++ b/clients/common/meson.build
@@ -76,7 +76,7 @@ libnmc = static_library(
dependencies: [
libnm_dep,
libnm_nm_default_dep,
- libnm_libnm_core_aux_dep,
+ libnm_core_aux_extern_dep,
],
c_args: [
'-DG_LOG_DOMAIN="libnmc"',
diff --git a/clients/common/nm-client-utils.h b/clients/common/nm-client-utils.h
index d6f163434a..0fd25c305d 100644
--- a/clients/common/nm-client-utils.h
+++ b/clients/common/nm-client-utils.h
@@ -9,7 +9,7 @@
#include "nm-meta-setting-desc.h"
#include "nm-active-connection.h"
#include "nm-device.h"
-#include "nm-libnm-core-intern/nm-libnm-core-utils.h"
+#include "libnm-core-aux-intern/nm-libnm-core-utils.h"
const NMObject **nmc_objects_sort_by_path(const NMObject *const *objs, gssize len);
diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c
index b6e3d671fa..c0d086e433 100644
--- a/clients/common/nm-meta-setting-desc.c
+++ b/clients/common/nm-meta-setting-desc.c
@@ -12,11 +12,11 @@
#include <linux/if_ether.h>
#include <linux/if_infiniband.h>
-#include "nm-libnm-core-intern/nm-common-macros.h"
+#include "libnm-core-aux-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-intern/nm-libnm-core-utils.h"
-#include "nm-libnm-core-aux/nm-libnm-core-aux.h"
+#include "libnm-core-aux-intern/nm-libnm-core-utils.h"
+#include "libnm-core-aux-extern/nm-libnm-core-aux.h"
#include "nm-vpn-helpers.h"
#include "nm-client-utils.h"
diff --git a/clients/common/nm-polkit-listener.c b/clients/common/nm-polkit-listener.c
index 357e1efb8b..c83aa128bb 100644
--- a/clients/common/nm-polkit-listener.c
+++ b/clients/common/nm-polkit-listener.c
@@ -30,7 +30,7 @@
#include "nm-glib-aux/nm-str-buf.h"
#include "nm-glib-aux/nm-secret-utils.h"
#include "nm-glib-aux/nm-io-utils.h"
-#include "nm-libnm-core-intern/nm-auth-subject.h"
+#include "libnm-core-aux-intern/nm-auth-subject.h"
#include "c-list/src/c-list.h"
#define LOGIND_BUS_NAME "org.freedesktop.login1"
diff --git a/clients/common/tests/meson.build b/clients/common/tests/meson.build
index 28b27ae9e0..0c2c727a46 100644
--- a/clients/common/tests/meson.build
+++ b/clients/common/tests/meson.build
@@ -6,6 +6,10 @@ exe = executable(
dependencies: [
libnmc_base_dep,
libnmc_dep,
+ libnm_core_aux_intern_dep_link,
+ libnm_core_aux_extern_dep_link,
+ libnm_glib_aux_dep_link,
+ libnm_base_dep_link,
],
c_args: [
'-DG_LOG_DOMAIN="test"',
@@ -23,8 +27,9 @@ exe = executable(
'test-libnm-core-aux.c',
dependencies: [
libnm_dep,
- libnm_libnm_core_aux_dep,
+ libnm_core_aux_extern_dep_link,
libnm_nm_default_dep,
+ libnm_glib_aux_dep_link,
],
c_args: [
'-DG_LOG_DOMAIN="test"',
diff --git a/clients/common/tests/test-libnm-core-aux.c b/clients/common/tests/test-libnm-core-aux.c
index bf639878c0..a0bfea25d2 100644
--- a/clients/common/tests/test-libnm-core-aux.c
+++ b/clients/common/tests/test-libnm-core-aux.c
@@ -5,8 +5,8 @@
#include "libnm/nm-default-client.h"
-#include "nm-libnm-core-aux/nm-libnm-core-aux.h"
-#include "nm-libnm-core-intern/nm-libnm-core-utils.h"
+#include "libnm-core-aux-extern/nm-libnm-core-aux.h"
+#include "libnm-core-aux-intern/nm-libnm-core-utils.h"
#include "nm-utils/nm-test-utils.h"
diff --git a/clients/meson.build b/clients/meson.build
index 2c92e29098..3e34c705cc 100644
--- a/clients/meson.build
+++ b/clients/meson.build
@@ -7,6 +7,7 @@ executable(
libnm_dep,
libnm_nm_default_dep,
libnm_libnm_aux_dep,
+ libnm_glib_aux_dep_link,
],
c_args: [
'-DG_LOG_DOMAIN="nm-online"',
diff --git a/clients/tui/meson.build b/clients/tui/meson.build
index 89f842e643..379200dbb0 100644
--- a/clients/tui/meson.build
+++ b/clients/tui/meson.build
@@ -51,6 +51,10 @@ executable(
libnmc_dep,
libnmt_newt_dep,
libnm_libnm_aux_dep,
+ libnm_core_aux_extern_dep_link,
+ libnm_core_aux_intern_dep_link,
+ libnm_base_dep_link,
+ libnm_glib_aux_dep_link,
],
c_args: [
'-DG_LOG_DOMAIN="nmtui"',
diff --git a/clients/tui/nmt-mac-entry.c b/clients/tui/nmt-mac-entry.c
index 2768eaab35..1f4cab9384 100644
--- a/clients/tui/nmt-mac-entry.c
+++ b/clients/tui/nmt-mac-entry.c
@@ -20,7 +20,7 @@
#include <linux/if_ether.h>
#include <linux/if_infiniband.h>
-#include "nm-libnm-core-intern/nm-common-macros.h"
+#include "libnm-core-aux-intern/nm-common-macros.h"
G_DEFINE_TYPE(NmtMacEntry, nmt_mac_entry, NMT_TYPE_NEWT_ENTRY)
diff --git a/clients/tui/nmt-page-bond.c b/clients/tui/nmt-page-bond.c
index 9c86a49860..8dfc38f861 100644
--- a/clients/tui/nmt-page-bond.c
+++ b/clients/tui/nmt-page-bond.c
@@ -19,7 +19,7 @@
#include <linux/if_ether.h>
#include <linux/if_infiniband.h>
-#include "nm-libnm-core-intern/nm-libnm-core-utils.h"
+#include "libnm-core-aux-intern/nm-libnm-core-utils.h"
#include "nmt-mac-entry.h"
#include "nmt-address-list.h"
#include "nmt-slave-list.h"