diff options
author | Thomas Haller <thaller@redhat.com> | 2021-02-12 15:01:09 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2021-02-18 19:46:51 +0100 |
commit | fdf9614ba793a023d9b6c0f6a078beded8143771 (patch) | |
tree | 1c21d90c0873da541302bc0e209428b667029054 /tools | |
parent | 2c1f8e9108a33eb3819b1bda1138a01bfd71746a (diff) | |
download | NetworkManager-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 'tools')
-rwxr-xr-x | tools/check-docs.sh | 4 | ||||
-rwxr-xr-x | tools/check-tree.sh | 4 | ||||
-rwxr-xr-x | tools/generate-docs-nm-property-infos.pl | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/tools/check-docs.sh b/tools/check-docs.sh index f4f05b91b1..a7526fcb45 100755 --- a/tools/check-docs.sh +++ b/tools/check-docs.sh @@ -23,7 +23,7 @@ same_lines() { libnm_headers() { ( - ls -1 "$1/libnm"/*.h "$1/libnm-core"/*.h | \ + ls -1 "$1/libnm"/*.h "$1/src/libnm-core-public"/*.h | \ if [ -n "$2" ]; then grep -v -F "$1/libnm-core/nm-core-enum-types.h" | \ grep -v -F "$1/libnm/nm-enum-types.h" @@ -31,7 +31,7 @@ libnm_headers() { cat fi if [ -n "$2" ]; then - ls -1 "$2/libnm"/*.h "$2/libnm-core"/*.h + ls -1 "$2/libnm"/*.h "$2/src/libnm-core-public"/*.h fi ) | sort | uniq } diff --git a/tools/check-tree.sh b/tools/check-tree.sh index cff85c3e16..cc6c80ef23 100755 --- a/tools/check-tree.sh +++ b/tools/check-tree.sh @@ -20,5 +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 +check_cmp src/libnm-core-intern/nm-meta-setting-base-impl.h clients/common/nm-meta-setting-base-impl.h +check_cmp src/libnm-core-impl/nm-meta-setting-base-impl.c clients/common/nm-meta-setting-base-impl.c diff --git a/tools/generate-docs-nm-property-infos.pl b/tools/generate-docs-nm-property-infos.pl index f850ee7429..7d33d140b4 100755 --- a/tools/generate-docs-nm-property-infos.pl +++ b/tools/generate-docs-nm-property-infos.pl @@ -65,7 +65,8 @@ close $fo; # get setting name from NM_SETTING_*_SETTING_NAME constant in C header file sub get_setting_name { my $path = $_[0]; - $path =~ s/c$/h/; # use header file to find out setting name + $path =~ s/\/libnm-core-impl\/nm-setting-(.*)\.c$/\/libnm-core-public\/nm-setting-$1.h/; # use header file to find out setting name + $path =~ s/\.c$/.h/; # use header file to find out setting name open my $fh, '<', $path or die "Can't open $path: $!"; while (my $line = <$fh>) { if ($line =~ /NM_SETTING_.+SETTING_NAME\s+\"(\S+)\"/) { |