"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.
When we do an in-tree-build with autotools and an out-of-tree build
with meson (all in the same source directory), then we have the
following files:
libnm-core/nm-core-enum-types.h
libnm/nm-enum-types.h
build/libnm-core/nm-core-enum-types.h
build/libnm/nm-enum-types.h
This caused "tools/check-docs.sh" for `ninja -C build test` to fail,
because the files are detected twice:
--- command ---
/data/src/NetworkManager/tools/check-docs.sh /data/src/NetworkManager /data/src/NetworkManager/build
--- stderr ---
8a9
> nm-core-enum-types
38a40
> nm-enum-types
*** Error: libnm classes not included in docs/libnm/libnm-docs.xml ***
-------
Try to make check-docs.sh script more readable.
Also, previously the script would check that one side was a subset
of the other side. Tighten this check up, now both sides of the
comparison must agree and yield the same lines.