# up-to-date. Then the os-specific source files and the C configuration file
# are set up, and finally it goes to the main Exim target.
-all: utils exim
+all: utils exim dynmodules
config: $(EDITME) checklocalmake Makefile os.c config.h version.h version.sh macro.c
exim_openssl exim_gnutls: clean exim
.PHONY: all config utils \
buildauths buildlookups buildpdkim buildrouters \
- buildtransports checklocalmake clean
+ buildtransports dynmodules checklocalmake clean
utils: $(EXIM_MONITOR) exicyclog exinext exiwhat \
# Targets for the various libraries that Exim uses.
+# Copies of modules built as dynamic-load libraries
+
+dynmodules: buildlookups buildrouters buildtransports buildauths
+ rm -fr dynmodules
+ mkdir dynmodules
+ for d in lookup router transport auth; do \
+ for f in $${d}s/*.so; do \
+ [ -e $$f ] && ln $$f dynmodules/`basename $$f .so`_$$d.so; \
+ done; \
+ done; \
+ true
+
# The lookups library.
buildlookups: config
if (!(dd = exim_opendir(CUS LOOKUP_MODULE_DIR)))
{
DEBUG(D_lookup) debug_printf("Couldn't open %s: not loading lookup modules\n", LOOKUP_MODULE_DIR);
- log_write(0, LOG_MAIN, "Couldn't open %s: not loading lookup modules\n", LOOKUP_MODULE_DIR);
+ log_write(0, LOG_MAIN|LOG_PANIC,
+ "Couldn't open %s: not loading lookup modules\n", LOOKUP_MODULE_DIR);
}
else
{
const pcre2_code * regex_islookupmod = regex_must_compile(
- US"\\." DYNLIB_FN_EXT "$", MCS_NOFLAGS, TRUE);
+ US"_lookup\\." DYNLIB_FN_EXT "$", MCS_NOFLAGS, TRUE);
DEBUG(D_lookup) debug_printf("Loading lookup modules from %s\n", LOOKUP_MODULE_DIR);
while ((ent = readdir(dd)))
# This is called from the main make file, after cd'ing
# to the lookups subdirectory.
#
-# Copyright (c) The Exim Maintainers 2021
+# Copyright (c) The Exim Maintainers 2021 - 2024
# nb: at build time, the version of this file used will have had some
# extra variable definitions and prepended to it and module build rules
-# interpolated below.
+# interpolated below. This is done by scripts/lookups-Makefile.
# MAGIC-TAG-MODS-OBJ-RULES-GO-HERE
all: lookups.a lf_quote.o lf_check_file.o lf_sqlperform.o $(MODS)
+# for f in *.so; do mv $$f `basename $$f .so`_lookup.so; done
lookups.a: $(OBJ)
@$(RM_COMMAND) -f lookups.a
($parm_exim_dir) = $parm_exim =~ m?^(.*)/exim?;
-while (my $file = glob("$parm_exim_dir/lookups/*.so")) {
+while (my $file = glob("$parm_exim_dir/dynmodules/*.so")) {
my $base = basename($file);
cp("$file", "eximdir/");
system("sudo chmod 755 eximdir/$base");