summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-02-07 10:53:44 +0100
committerThomas Haller <thaller@redhat.com>2021-02-09 12:38:19 +0100
commitb13a2b27e93d11d2472665c9152032ca21caf65e (patch)
tree6846d38f7d3c609e0bd281db1f2b6a56412e04ca /tools
parent789347e0d61fc0aad9c738fff864d4a1453fba8c (diff)
all: move shared/nm-meta-setting.[hc] to libnm-core and clients
"shared/nm-meta-setting.[hc]" contains meta data about settings. As such it is similarly used by libnm-core (as internal API) and by clients (as extension of public API of libnm). However, it must be compiled twice, because while it defines in both cases a NMMetaSettingInfo type, these types are different between internal and public API. Hence, the files must also be compiled twice (and differently), once against libnm-core and once against the client helper library. Previously, the file was under "shared/", but there it's a bit odd it doesn't clearly belong anywhere. There are two goals here: - copy the file to the two places where it is used. We also have a "check-tree" unit test that ensures those files don't diverge in the future. - we no longer require CFLAGS set during built. Instead, the sources should control the build. For that we have new (simple) headers "nm-meta-setting-base.h" that define the right behavior for the impl files. There is still an ugliness (among several): the files must be named the same for libnm-core and clients/common. Preferably, all our sources have unique names, but that is not possible with this scheme (without introducing other ugliness). To mitigate that, include the files only at one exact place.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/check-tree.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/check-tree.sh b/tools/check-tree.sh
index 8437c4752d..cff85c3e16 100755
--- a/tools/check-tree.sh
+++ b/tools/check-tree.sh
@@ -20,3 +20,5 @@ check_cmp() {
}
check_cmp shared/nm-base/nm-ethtool-utils-base.h libnm/nm-ethtool-utils.h
+check_cmp libnm-core/nm-meta-setting-base-impl.h clients/common/nm-meta-setting-base-impl.h
+check_cmp libnm-core/nm-meta-setting-base-impl.c clients/common/nm-meta-setting-base-impl.c