Skip to content

Commit 9dca2f9

Browse files
committed
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.
1 parent 873bcd9 commit 9dca2f9

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ doc/wiki/*.txt
7878
doc/wiki/Makefile.am
7979
src/anvil/anvil
8080
src/auth/auth
81-
src/lib-settings/settings-history-core.c
81+
src/lib-settings/settings-history-core.h
8282
src/config/all-settings.c
8383
src/config/config
8484
src/config/doveconf

src/lib-settings/Makefile.am

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ headers = \
1919
pkginc_libdir=$(pkgincludedir)
2020
pkginc_lib_HEADERS = $(headers)
2121

22-
BUILT_SOURCES = settings-history-core.c
22+
BUILT_SOURCES = settings-history-core.h
2323

24-
settings-history.c: settings-history-core.c
24+
settings-history.c: settings-history-core.h
2525

26-
settings-history-core.c: $(srcdir)/settings-history-core.txt $(srcdir)/settings-history.py
26+
settings-history-core.h: $(srcdir)/settings-history-core.txt $(srcdir)/settings-history.py
2727
$(AM_V_GEN)$(srcdir)/settings-history.py --pro $(DOVECOT_PRO_BUILD) $< $@
2828

2929
EXTRA_DIST = \

src/lib-settings/settings-history.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "array.h"
55
#include "settings-history.h"
66

7-
#include "settings-history-core.c"
7+
#include "settings-history-core.h"
88

99
static struct settings_history history;
1010

0 commit comments

Comments
 (0)