From: Fred Morcos Date: Mon, 7 Apr 2025 12:51:32 +0000 (+0200) Subject: config: Change the generated settings-history-core from .h to .c X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9dca2f961f83a071d2ff516cd332cd4aa88484dd;p=thirdparty%2Fdovecot%2Fcore.git config: Change the generated settings-history-core from .h to .c 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. --- diff --git a/.gitignore b/.gitignore index e52ebe0d82..4d97b907c5 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/src/lib-settings/Makefile.am b/src/lib-settings/Makefile.am index f11abae2c2..92323ed901 100644 --- a/src/lib-settings/Makefile.am +++ b/src/lib-settings/Makefile.am @@ -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 = \ diff --git a/src/lib-settings/settings-history.c b/src/lib-settings/settings-history.c index a2abb21985..e3d50ea64f 100644 --- a/src/lib-settings/settings-history.c +++ b/src/lib-settings/settings-history.c @@ -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;