build: fix regenerating "nm-property-infos-%.xml" files on changes

Imagine checking out the loopback feature branch and building. Thereby the
"src/libnm-client-impl/nm-property-infos-%.xml" files get generated
and contains a `<setting name="loopback"/>`.

Then switch back to `main` branch and type make again. Note that none
of the "src/libnm-core-impl/nm-setting-*.c" files changed, except that
"nm-setting-loopback.c" got removed.

Consequently, the XML won't be regenerated and the followup steps will
fail due to the leftover reference to the non-existing setting.

Fix that by regenerating "nm-property-infos-%.xml" if "libnm-core-impl.la"
changes.
This commit is contained in:
Thomas Haller 2022-09-09 15:05:34 +02:00
parent a4cf48f8bc
commit e7f76d025f
No known key found for this signature in database
GPG Key ID: 29C2366E4DFC5728

View File

@ -1958,8 +1958,13 @@ endif
libnm_docs_sources = $(src_libnm_core_impl_lib_c_settings_real)
src/libnm-client-impl/nm-property-infos-%.xml: tools/generate-docs-nm-property-infos.py $(libnm_docs_sources)
$(AM_V_GEN) "$(PYTHON)" $(srcdir)/tools/generate-docs-nm-property-infos.py $(patsubst nm-property-infos-%.xml,%,$(notdir $@)) $@ $(filter-out $<,$^)
src/libnm-client-impl/nm-property-infos-%.xml: tools/generate-docs-nm-property-infos.py src/libnm-core-impl/libnm-core-impl.la $(libnm_docs_sources)
$(AM_V_GEN) \
"$(PYTHON)" \
$(srcdir)/tools/generate-docs-nm-property-infos.py \
$(patsubst nm-property-infos-%.xml,%,$(notdir $@)) \
$@ \
$(wordlist 3,1000,$^)
src/libnm-client-impl/nm-settings-docs-gir.xml: tools/generate-docs-nm-settings-docs-gir.py src/libnm-client-impl/NM-1.0.gir src/libnm-client-impl/NM-1.0.typelib src/libnm-client-impl/libnm.la $(libnm_docs_sources)
$(AM_V_GEN) \