diff options
author | Thomas Haller <thaller@redhat.com> | 2020-11-01 17:57:33 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-11-03 15:41:38 +0100 |
commit | a208da4139c6ce53c7c2e386e43f48a876e7f75d (patch) | |
tree | 4619fc442e6fceb72c19ee3434cdefff3859ad9b | |
parent | 6968c4141c901f6c2fc43c7885c5907be9c206c7 (diff) | |
download | NetworkManager-a208da4139c6ce53c7c2e386e43f48a876e7f75d.tar.gz |
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).
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | clients/common/meson.build | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 6e5b9446af..90c719f175 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 cefcfce02d..81fc22d695 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, |