From a208da4139c6ce53c7c2e386e43f48a876e7f75d Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sun, 1 Nov 2020 17:57:33 +0100 Subject: [PATCH] build: only generate "settings-docs.h" with "--enable-gtk-doc" Note that "--enable-gtk-doc" requires "--enable-introspection". For generating "settings-docs.h" we (only) need introspection/pygobject. We also have a pre-generated .in file that we can use if introspection is not available. Since we have a pre-generated variant, it would be fine to always use that one. However, we want to use generate the file if we have the necessary dependencies, because thereby we can check whether the pre-generated file is identical to what would be generated. We have a similar problem with "generate-docs-nm-settings-nmcli.xml". However there we don't need introspection, but merely being able to execute a binary that we build. That does not work during cross compilation, so we will honor "--enable-gtk-doc" flag to decide when to generate the file. For consistency, also adjust the condition for "settings-docs.h" to only generate the file if we have "--enable-gtk-doc" (but not it we build with "--enable-introspection" alone). --- Makefile.am | 2 +- clients/common/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 6e5b9446a..90c719f17 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4453,7 +4453,7 @@ $(clients_common_libnmc_base_la_OBJECTS): $(libnm_lib_h_pub_mkenums) $(clients_common_libnmc_base_la_OBJECTS): clients/common/.dirstamp clients_common_settings_doc_h = clients/common/settings-docs.h -if HAVE_INTROSPECTION +if BUILD_DOCS $(clients_common_settings_doc_h): clients/common/settings-docs.xsl libnm/nm-settings-docs-gir.xml clients/common/.dirstamp $(AM_V_GEN) $(XSLTPROC) --output $@ $< $(word 2,$^) DISTCLEANFILES += $(clients_common_settings_doc_h) diff --git a/clients/common/meson.build b/clients/common/meson.build index cefcfce02..81fc22d69 100644 --- a/clients/common/meson.build +++ b/clients/common/meson.build @@ -31,7 +31,7 @@ libnmc_base_dep = declare_dependency( settings_docs = 'settings-docs.h' -if enable_introspection +if enable_docs settings_docs_source = custom_target( settings_docs, input: nm_settings_docs_xml_gir,