From e7f76d025f5d78bc9f0450ecaa390dc3d01ab8eb Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 9 Sep 2022 15:05:34 +0200 Subject: [PATCH] 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 ``. 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. --- Makefile.am | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index e97e82b8db..c40e1d2112 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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) \