mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 08:20:28 +01:00
build: Rename settings-docs.c file
The `settings-docs.c` file is generated by processing the `nm-property-docs.xml` file. Although this works in autotools, the `.c` extension makes meson not to handle it properly. Given the fact that it only contains a number of defines it makes sense to change its extension to `.h` an use it as a header. This also makes meson to handle it properly and build it before its used. https://mail.gnome.org/archives/networkmanager-list/2018-January/msg00057.html
This commit is contained in:
parent
54641388f8
commit
7b34c3cf3e
6 changed files with 15 additions and 15 deletions
22
Makefile.am
22
Makefile.am
|
|
@ -3343,27 +3343,27 @@ clients_common_libnmc_base_la_LIBADD = \
|
|||
$(clients_common_libnmc_base_la_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
|
||||
$(clients_common_libnmc_base_la_OBJECTS): clients/common/.dirstamp
|
||||
|
||||
clients_common_settings_doc_c = clients/common/settings-docs.c
|
||||
clients_common_settings_doc_h = clients/common/settings-docs.h
|
||||
if HAVE_INTROSPECTION
|
||||
$(clients_common_settings_doc_c): clients/common/settings-docs.xsl libnm/nm-property-docs.xml clients/common/.dirstamp
|
||||
$(clients_common_settings_doc_h): clients/common/settings-docs.xsl libnm/nm-property-docs.xml clients/common/.dirstamp
|
||||
$(AM_V_GEN) $(XSLTPROC) --output $@ $< $(word 2,$^)
|
||||
DISTCLEANFILES += $(clients_common_settings_doc_c)
|
||||
check-local-settings-docs: $(clients_common_settings_doc_c)
|
||||
DISTCLEANFILES += $(clients_common_settings_doc_h)
|
||||
check-local-settings-docs: $(clients_common_settings_doc_h)
|
||||
@if test -z "$$NMTST_NO_CHECK_SETTINGS_DOCS" ; then \
|
||||
if ! cmp -s "$(srcdir)/$(clients_common_settings_doc_c).in" "$(builddir)/$(clients_common_settings_doc_c)" ; then \
|
||||
echo "The generated file \"$(builddir)/$(clients_common_settings_doc_c)\" differs from the source file \"$(srcdir)/$(clients_common_settings_doc_c).in\". You probably should copy the generated file over to the source file. You can skip this test by setting \$$NMTST_NO_CHECK_SETTINGS_DOCS=yes"; \
|
||||
if ! cmp -s "$(srcdir)/$(clients_common_settings_doc_h).in" "$(builddir)/$(clients_common_settings_doc_h)" ; then \
|
||||
echo "The generated file \"$(builddir)/$(clients_common_settings_doc_h)\" differs from the source file \"$(srcdir)/$(clients_common_settings_doc_h).in\". You probably should copy the generated file over to the source file. You can skip this test by setting \$$NMTST_NO_CHECK_SETTINGS_DOCS=yes"; \
|
||||
false; \
|
||||
fi;\
|
||||
fi
|
||||
check_local += check-local-settings-docs
|
||||
else
|
||||
$(clients_common_settings_doc_c): $(clients_common_settings_doc_c).in clients/common/.dirstamp
|
||||
$(AM_V_GEN) cp "$(srcdir)/$(clients_common_settings_doc_c).in" "$(builddir)/$(clients_common_settings_doc_c)"
|
||||
$(clients_common_settings_doc_h): $(clients_common_settings_doc_h).in clients/common/.dirstamp
|
||||
$(AM_V_GEN) cp "$(srcdir)/$(clients_common_settings_doc_h).in" "$(builddir)/$(clients_common_settings_doc_h)"
|
||||
check-local-settings-docs:
|
||||
endif
|
||||
EXTRA_DIST += \
|
||||
$(clients_common_settings_doc_c) \
|
||||
$(clients_common_settings_doc_c).in
|
||||
$(clients_common_settings_doc_h) \
|
||||
$(clients_common_settings_doc_h).in
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
check_ltlibraries += clients/common/libnmc.la
|
||||
|
|
@ -3392,7 +3392,7 @@ clients_common_libnmc_la_LIBADD = \
|
|||
$(GLIB_LIBS)
|
||||
|
||||
$(clients_common_libnmc_la_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
|
||||
$(clients_common_libnmc_la_OBJECTS): $(clients_common_settings_doc_c)
|
||||
$(clients_common_libnmc_la_OBJECTS): $(clients_common_settings_doc_h)
|
||||
$(clients_common_libnmc_la_OBJECTS): clients/common/.dirstamp
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ sources = shared_meta_setting + files(
|
|||
'nm-meta-setting-desc.c'
|
||||
)
|
||||
|
||||
settings_docs = 'settings-docs.c'
|
||||
settings_docs = 'settings-docs.h'
|
||||
|
||||
if enable_introspection
|
||||
settings_docs_source = custom_target(
|
||||
|
|
|
|||
|
|
@ -4889,7 +4889,7 @@ static const NMMetaPropertyType _pt_gobject_devices = {
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
#include "settings-docs.c"
|
||||
#include "settings-docs.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -74,4 +74,4 @@ option('libpsl', type: 'boolean', value: true, description: 'Link against libpsl
|
|||
option('json_validation', type: 'boolean', value: true, description: 'Enable JSON validation in libnm')
|
||||
option('crypto', type: 'combo', choices: ['nss', 'gnutls'], value: 'nss', description: 'Cryptography library to use for certificate and key operations')
|
||||
option('qt', type: 'boolean', value: true, description: 'enable Qt examples')
|
||||
option('check_settings_docs', type: 'boolean', value: false, description: 'compare check settings-docs.c file')
|
||||
option('check_settings_docs', type: 'boolean', value: false, description: 'compare check settings-docs.h file')
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ clients/common/nm-meta-setting-desc.c
|
|||
clients/common/nm-polkit-listener.c
|
||||
clients/common/nm-secret-agent-simple.c
|
||||
clients/common/nm-vpn-helpers.c
|
||||
clients/common/settings-docs.c.in
|
||||
clients/common/settings-docs.h.in
|
||||
clients/nm-online.c
|
||||
clients/tui/newt/nmt-newt-utils.c
|
||||
clients/tui/nm-editor-utils.c
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue