build/meson: fix gtkdoc dependencies
Summary
This merge request fixes the dependencies required for building the documentation by using ninja directly (instead of meson install
)
Purpose
Previously, trying to build the API documentation via ninja NetworkManager-doc
failed due to missing dependencies:
[~/NetworkManager/build] $ ninja NetworkManager-doc
[474/474] Generating docs/api/NetworkManager-doc with a custom command
FAILED: docs/api/NetworkManager-decl.txt
...
ERROR: Error in gtkdoc helper script:
ERROR: ['/bin/gtkdoc-mkhtml', '--path=/home/jvaclav/NetworkManager/docs/api:/home/jvaclav/NetworkManager/build/docs/api', 'NetworkManager', '../network-manager-docs.xml'] failed with status 6
warning: failed to load external entity "../../../man/nm-settings-dbus.xml"
warning: failed to load external entity "../../../man/nm-settings-nmcli.xml"
warning: failed to load external entity "../../../man/nm-settings-keyfile.xml"
warning: failed to load external entity "../../../man/nm-settings-ifcfg-rh.xml"
warning: failed to load external entity "../../../src/libnm-core-public/nm-dbus-types.xml"
../network-manager-docs.xml:263: element include: XInclude error : could not load ../../../src/libnm-core-public/nm-dbus-types.xml, and no fallback was found
warning: failed to load external entity "../../../src/libnm-core-public/nm-vpn-dbus-types.xml"
../network-manager-docs.xml:287: element include: XInclude error : could not load ../../../src/libnm-core-public/nm-vpn-dbus-types.xml, and no fallback was found
ninja: build stopped: subcommand failed.
I believe this happens due to some different handling of static paths vs. custom_target
by meson in this case.
Checklist
Please read https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md before opening the merge request. In particular, check that:
-
the subject for all commits is concise and explicative -
the message for all commits explains the reason for the change -
the source is properly formatted -
any relevant documentation is up to date -
you have added unit tests if applicable