diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2018-01-11 17:02:13 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-01-12 09:39:06 +0100 |
commit | 7b34c3cf3ea4b4c1f25f848f8f42537bbdec10d4 (patch) | |
tree | 2e5a0985c1c73818633a74e236e174590d193c8c | |
parent | 54641388f8af6bf9e3de3105571362167a8aed00 (diff) | |
download | NetworkManager-7b34c3cf3ea4b4c1f25f848f8f42537bbdec10d4.tar.gz |
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
-rw-r--r-- | Makefile.am | 22 | ||||
-rw-r--r-- | clients/common/meson.build | 2 | ||||
-rw-r--r-- | clients/common/nm-meta-setting-desc.c | 2 | ||||
-rw-r--r-- | clients/common/settings-docs.h.in (renamed from clients/common/settings-docs.c.in) | 0 | ||||
-rw-r--r-- | meson_options.txt | 2 | ||||
-rw-r--r-- | po/POTFILES.in | 2 |
6 files changed, 15 insertions, 15 deletions
diff --git a/Makefile.am b/Makefile.am index 4ca76f6448..6b3bc3ad9e 100644 --- a/Makefile.am +++ b/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 diff --git a/clients/common/meson.build b/clients/common/meson.build index 46489f4140..ea26bccfb4 100644 --- a/clients/common/meson.build +++ b/clients/common/meson.build @@ -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( diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c index 9943b35eff..a028c9a3fa 100644 --- a/clients/common/nm-meta-setting-desc.c +++ b/clients/common/nm-meta-setting-desc.c @@ -4889,7 +4889,7 @@ static const NMMetaPropertyType _pt_gobject_devices = { /*****************************************************************************/ -#include "settings-docs.c" +#include "settings-docs.h" /*****************************************************************************/ diff --git a/clients/common/settings-docs.c.in b/clients/common/settings-docs.h.in index 1f3a1a62be..1f3a1a62be 100644 --- a/clients/common/settings-docs.c.in +++ b/clients/common/settings-docs.h.in diff --git a/meson_options.txt b/meson_options.txt index cd904c5f57..f22eb28a4f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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') diff --git a/po/POTFILES.in b/po/POTFILES.in index 7abff01146..d41376b5c7 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -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 |