]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
config: Change the generated settings-history-core from .h to .c
authorFred Morcos <fred.morcos@open-xchange.com>
Mon, 7 Apr 2025 12:51:32 +0000 (14:51 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 9 Apr 2025 06:33:18 +0000 (08:33 +0200)
This changes the output file to a header file instead of a C file, this helps meson deal
better with dependencies on custom_targets.

It is technically an #included header file so it makes sense.

The ideal solution would be to keep it as a C file, and add forward declarations of the
arrays defined in it instead of verbatim #include'ing it. However, array forward decls are
not possible without a specified size which cannot be provided in advance and declaring
them as pointers is perhaps not the best idea.

.gitignore
src/lib-settings/Makefile.am
src/lib-settings/settings-history.c

index e52ebe0d82918f3f26378ceb0d5ddb035979c251..4d97b907c5ab3d3736d277ae5678aa7fb091cce5 100644 (file)
@@ -78,7 +78,7 @@ doc/wiki/*.txt
 doc/wiki/Makefile.am
 src/anvil/anvil
 src/auth/auth
-src/lib-settings/settings-history-core.c
+src/lib-settings/settings-history-core.h
 src/config/all-settings.c
 src/config/config
 src/config/doveconf
index f11abae2c2333b6f774efb69d24d902d8fcba589..92323ed901ab9e8df7b5e237ce6202e3e1323bd5 100644 (file)
@@ -19,11 +19,11 @@ headers = \
 pkginc_libdir=$(pkgincludedir)
 pkginc_lib_HEADERS = $(headers)
 
-BUILT_SOURCES = settings-history-core.c
+BUILT_SOURCES = settings-history-core.h
 
-settings-history.c: settings-history-core.c
+settings-history.c: settings-history-core.h
 
-settings-history-core.c: $(srcdir)/settings-history-core.txt $(srcdir)/settings-history.py
+settings-history-core.h: $(srcdir)/settings-history-core.txt $(srcdir)/settings-history.py
        $(AM_V_GEN)$(srcdir)/settings-history.py --pro $(DOVECOT_PRO_BUILD) $< $@
 
 EXTRA_DIST = \
index a2abb2198511c8325c86b9a71666c5da2ea14fa9..e3d50ea64f43c993d113834cfb5c23502d5bb205 100644 (file)
@@ -4,7 +4,7 @@
 #include "array.h"
 #include "settings-history.h"
 
-#include "settings-history-core.c"
+#include "settings-history-core.h"
 
 static struct settings_history history;