mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-03 06:38:05 +02:00
nmcli has documentation strings embedded. Those strings are extracted from gtk-doc comments, using pygobject and put in the generated file "clients/common/settings-docs.c". This file "clients/common/settings-docs.c" is disted, so from a source tarball you can build nmcli without enabling introspection. However, when building from a git-tree, the file is missing and thus one cannot build --with-nmcli unless also using at least --enable-introspection to generate "clients/common/settings-docs.c". That is inconvenient. Especially during cross-compilation, where one also needs python and pygobject in the foreign architecture (because the generation of "settings-docs.c" loads the built libnm.so via pygobject). It is bad because nmcli is an essential part of NetworkManager, so building --without-nmcli is not a great option. Previously, the only alternative was to pre-generate a source tarball on a separate machine and build that. This however complicates efforts to automatically build git snapshots of NetworkManager. Fix that by commiting "clients/common/settings-docs.c.in" to git. When building with --disable-introspection, the pre-generated file is used instead. This is fine, because the file only depends on static, checked-in documentation strings that seldomly change. Also add a check target to notice when the pre-generated file differs from what we are about to generate during --enable-introspection. That happens when editing one of the gtk-doc entires. In this case, `make check` will notify that the pre-generated "settings-docs.c.in" file needs updating too. Yes, when changing gtk-doc comments you need to updte the file manually. At least, the check failure notifies you. |
||
|---|---|---|
| .. | ||
| cli | ||
| common | ||
| tui | ||
| nm-online.c | ||