# optional, Local/* files at the front of this file, to create Makefile in the
# build directory.
#
-# Copyright (c) The Exim Maintainers 2016
+# Copyright (c) The Exim Maintainers 2017
SHELL = $(MAKE_SHELL)
SCRIPTS = ../scripts
# are set up, and finally it goes to the main Exim target.
all: utils exim
-config: $(EDITME) checklocalmake Makefile os.c config.h version.h macro.c
+config: $(EDITME) checklocalmake Makefile os.c config.h version.h version.sh macro_defs.c
-checklocalmake:
+checklocalmake:
@if $(SHELL) $(SCRIPTS)/newer $(EDITME)-$(OSTYPE) $(EDITME) || \
$(SHELL) $(SCRIPTS)/newer $(EDITME)-$(ARCHTYPE) $(EDITME) || \
$(SHELL) $(SCRIPTS)/newer $(EDITME)-$(OSTYPE)-$(ARCHTYPE) $(EDITME); \
macro-smtp.o macro-accept.o macro-dnslookup.o macro-ipliteral.o macro-iplookup.o \
macro-manualroute.o macro-queryprogram.o macro-redirect.o \
macro-auth-spa.o macro-cram_md5.o macro-cyrus_sasl.o macro-dovecot.o macro-gsasl_exim.o \
- macro-heimdal_gssapi.o macro-plaintext.o macro-spa.o macro-tls.o\
- macro-dkim.o
+ macro-heimdal_gssapi.o macro-plaintext.o macro-spa.o macro-authtls.o \
+ macro-dkim.o macro-malware.o macro-macro.o macro-tree.o macro-signing.o
$(OBJ_MACRO): $(MACRO_HSRC)
macro-spa.o : auths/spa.c
@echo "$(CC) -DMACRO_PREDEF auths/spa.c"
$(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/spa.c
-macro-tls.o: auths/tls.c
+macro-authtls.o: auths/tls.c
@echo "$(CC) -DMACRO_PREDEF auths/tls.c"
$(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/tls.c
macro-dkim.o: dkim.c
@echo "$(CC) -DMACRO_PREDEF dkim.c"
$(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ dkim.c
+macro-malware.o: malware.c
+ @echo "$(CC) -DMACRO_PREDEF malware.c"
+ $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ malware.c
+macro-macro.o: macro.c
+ @echo "$(CC) -DMACRO_PREDEF macro.c"
+ $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ macro.c
+macro-tree.o: tree.c
+ @echo "$(CC) -DMACRO_PREDEF tree.c"
+ $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ tree.c
+macro-signing.o: pdkim/signing.c
+ @echo "$(CC) -DMACRO_PREDEF pdkim/signing.c"
+ $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ pdkim/signing.c
macro_predef: $(OBJ_MACRO)
@echo "$(LNCC) -o $@"
$(FE)$(LNCC) -o $@ $(LFLAGS) $(OBJ_MACRO)
-macro.c: macro_predef
- ./macro_predef > macro.c
+macro_defs.c: macro_predef
+ ./macro_predef > macro_defs.c
# This target is recognized specially by GNU make. It records those targets
# that do not correspond to files that are being built and which should
# Target for the exicyclog utility script
exicyclog: config ../src/exicyclog.src
@rm -f exicyclog
- @sed \
+ @. ./version.sh && sed \
-e "s?PROCESSED_FLAG?This file has been so processed.?"\
-e "/^# /p" \
-e "/^# /d" \
-e "s?MV_COMMAND?$(MV_COMMAND)?" \
-e "s?RM_COMMAND?$(RM_COMMAND)?" \
-e "s?TOUCH_COMMAND?$(TOUCH_COMMAND)?" \
+ -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
+ -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
../src/exicyclog.src > exicyclog-t
@mv exicyclog-t exicyclog
@chmod a+x exicyclog
# Target for the exinext utility script
exinext: config ../src/exinext.src
@rm -f exinext
- @sed \
+ @. ./version.sh && sed \
-e "s?PROCESSED_FLAG?This file has been so processed.?"\
-e "/^# /p" \
-e "/^# /d" \
-e "s?CONFIGURE_FILE_USE_NODE?$(CONFIGURE_FILE_USE_NODE)?" \
-e "s?CONFIGURE_FILE?$(CONFIGURE_FILE)?" \
-e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \
+ -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
+ -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
../src/exinext.src > exinext-t
@mv exinext-t exinext
@chmod a+x exinext
# Target for the exiwhat utility script
exiwhat: config ../src/exiwhat.src
@rm -f exiwhat
- @sed \
+ @. ./version.sh && sed \
-e "s?PROCESSED_FLAG?This file has been so processed.?"\
-e "/^# /p" \
-e "/^# /d" \
-e "s?EXIWHAT_EGREP_ARG?$(EXIWHAT_EGREP_ARG)?" \
-e "s?EXIWHAT_MULTIKILL_CMD?$(EXIWHAT_MULTIKILL_CMD)?" \
-e "s?EXIWHAT_MULTIKILL_ARG?$(EXIWHAT_MULTIKILL_ARG)?" \
+ -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
+ -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
+ -e "s?RM_COMMAND?$(RM_COMMAND)?" \
../src/exiwhat.src > exiwhat-t
@mv exiwhat-t exiwhat
@chmod a+x exiwhat
# Target for the exim_checkaccess utility script
exim_checkaccess: config ../src/exim_checkaccess.src
@rm -f exim_checkaccess
- @sed \
+ @. ./version.sh && sed \
-e "s?PROCESSED_FLAG?This file has been so processed.?"\
-e "/^# /p" \
-e "/^# /d" \
-e "s?CONFIGURE_FILE?$(CONFIGURE_FILE)?" \
-e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \
-e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
+ -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
+ -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
../src/exim_checkaccess.src > exim_checkaccess-t
@mv exim_checkaccess-t exim_checkaccess
@chmod a+x exim_checkaccess
../Local/eximon.conf
@rm -f eximon
$(SHELL) $(SCRIPTS)/Configure-eximon
- @sed \
+ @. ./version.sh && sed \
-e "s?PROCESSED_FLAG?This file has been so processed.?"\
-e "/^# /p" \
-e "/^# /d" \
-e "s?BASENAME_COMMAND?$(BASENAME_COMMAND)?" \
-e "s?HOSTNAME_COMMAND?$(HOSTNAME_COMMAND)?" \
-e "s?X11_LD_LIBRARY?$(X11_LD_LIB)?" \
+ -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
+ -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
../src/eximon.src >> eximon
@echo ">>> eximon script built"; echo ""
# Targets for utilities; these are all Perl scripts that have to get the
# location of Perl put in them. A few need other things as well.
-exigrep: Makefile ../src/exigrep.src
+exigrep: config ../src/exigrep.src
@rm -f exigrep
- @sed \
+ @. ./version.sh && sed \
-e "s?PROCESSED_FLAG?This file has been so processed.?"\
-e "/^# /p" \
-e "/^# /d" \
-e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
-e "s?ZCAT_COMMAND?$(ZCAT_COMMAND)?" \
-e "s?COMPRESS_SUFFIX?$(COMPRESS_SUFFIX)?" \
+ -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
+ -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
../src/exigrep.src > exigrep-t
@mv exigrep-t exigrep
@chmod a+x exigrep
@echo ">>> exigrep script built"
-eximstats: Makefile ../src/eximstats.src
+eximstats: config ../src/eximstats.src
@rm -f eximstats
- @sed \
+ @. ./version.sh && sed \
-e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
+ -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
+ -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
../src/eximstats.src > eximstats-t
@mv eximstats-t eximstats
@chmod a+x eximstats
@echo ">>> eximstats script built"
-exiqgrep: Makefile ../src/exiqgrep.src
+exiqgrep: config ../src/exiqgrep.src
@rm -f exiqgrep
- @sed \
+ @. ./version.sh && sed \
-e "s?PROCESSED_FLAG?This file has been so processed.?"\
-e "/^# /p" \
-e "/^# /d" \
-e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \
-e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
+ -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
+ -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
../src/exiqgrep.src > exiqgrep-t
@mv exiqgrep-t exiqgrep
@chmod a+x exiqgrep
@echo ">>> exiqgrep script built"
-exiqsumm: Makefile ../src/exiqsumm.src
+exiqsumm: config ../src/exiqsumm.src
@rm -f exiqsumm
- @sed -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
+ @. ./version.sh && sed \
+ -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
+ -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
+ -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
../src/exiqsumm.src > exiqsumm-t
@mv exiqsumm-t exiqsumm
@chmod a+x exiqsumm
@echo ">>> exiqsumm script built"
-exipick: Makefile ../src/exipick.src
+exipick: config ../src/exipick.src
@rm -f exipick
- @sed -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
+ @. ./version.sh && sed \
+ -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
-e "s?SPOOL_DIRECTORY?$(SPOOL_DIRECTORY)?" \
-e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \
+ -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
+ -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
../src/exipick.src > exipick-t
@mv exipick-t exipick
@chmod a+x exipick
@echo ">>> exipick script built"
-transport-filter.pl: Makefile ../src/transport-filter.src
+transport-filter.pl: config ../src/transport-filter.src
@rm -f transport-filter.pl
- @sed -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
+ @. ./version.sh && sed \
+ -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
+ -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
+ -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
../src/transport-filter.src > transport-filter.pl-t
@mv transport-filter.pl-t transport-filter.pl
@chmod a+x transport-filter.pl
@echo ">>> transport-filter.pl script built"
-convert4r3: Makefile ../src/convert4r3.src
+convert4r3: config ../src/convert4r3.src
@rm -f convert4r3
- @sed -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
+ @. ./version.sh && sed \
+ -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
+ -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
+ -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
../src/convert4r3.src > convert4r3-t
@mv convert4r3-t convert4r3
@chmod a+x convert4r3
@echo ">>> convert4r3 script built"
-convert4r4: Makefile ../src/convert4r4.src
+convert4r4: config ../src/convert4r4.src
@rm -f convert4r4
- @sed -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
+ @. ./version.sh && sed \
+ -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \
+ -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \
+ -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \
../src/convert4r4.src > convert4r4-t
@mv convert4r4-t convert4r4
@chmod a+x convert4r4
OBJ_WITH_CONTENT_SCAN = malware.o mime.o regex.o spam.o spool_mbox.o
OBJ_EXPERIMENTAL = bmi_spam.o \
- dane.o \
- dcc.o \
- dmarc.o \
- imap_utf7.o \
- spf.o \
- srs.o \
- utf8.o
+ dane.o \
+ dcc.o \
+ dmarc.o \
+ imap_utf7.o \
+ spf.o \
+ srs.o \
+ utf8.o
# Targets for final binaries; the main one has a build number which is
# updated each time. We don't bother with that for the auxiliaries.
OBJ_LOOKUPS = lookups/lf_quote.o lookups/lf_check_file.o lookups/lf_sqlperform.o
OBJ_EXIM = acl.o base64.o child.o crypt16.o daemon.o dbfn.o debug.o deliver.o \
- directory.o dns.o drtables.o enq.o exim.o expand.o filter.o \
- filtertest.o globals.o dkim.o dkim_transport.o hash.o \
- header.o host.o ip.o log.o lss.o match.o moan.o \
+ dkim.o dkim_transport.o directory.o dns.o drtables.o enq.o exim.o \
+ expand.o environment.o filter.o filtertest.o globals.o hash.o \
+ header.o host.o ip.o log.o lss.o macro.o macro_defs.o match.o moan.o \
os.o parse.o queue.o \
rda.o readconf.o receive.o retry.o rewrite.o rfc2047.o \
route.o search.o sieve.o smtp_in.o smtp_out.o spool_in.o spool_out.o \
std-crypto.o store.o string.o tls.o tod.o transport.o tree.o verify.o \
- environment.o macro.o \
$(OBJ_LOOKUPS) \
local_scan.o $(EXIM_PERL) $(OBJ_WITH_CONTENT_SCAN) \
$(OBJ_EXPERIMENTAL)
# Update Exim's version information and build the version object.
-version.h::
+version.h version.sh::
@../scripts/reversion
cnumber.h: version.h
debug.o: $(HDRS) debug.c
deliver.o: $(HDRS) transports/smtp.h deliver.c
directory.o: $(HDRS) directory.c
+dkim.o: $(HDRS) pdkim/pdkim.h dkim.c
+dkim_transport.o: $(HDRS) dkim_transport.c
dns.o: $(HDRS) dns.c
enq.o: $(HDRS) enq.c
exim.o: $(HDRS) exim.c
ip.o: $(HDRS) ip.c
log.o: $(HDRS) log.c
lss.o: $(HDRS) lss.c
+macro.o: $(HDRS) macro.c
+macro_defs.o: $(HDRS) macro_defs.c
match.o: $(HDRS) match.c
moan.o: $(HDRS) moan.c
os.o: $(HDRS) $(OS_C_INCLUDES) os.c
transport.o: $(HDRS) transport.c
tree.o: $(HDRS) tree.c
verify.o: $(HDRS) transports/smtp.h verify.c
-dkim.o: $(HDRS) pdkim/pdkim.h dkim.c
-dkim_transport.o: $(HDRS) dkim_transport.c
# Dependencies for WITH_CONTENT_SCAN modules
# Dependencies for EXPERIMENTAL_* modules
bmi_spam.o: $(HDRS) bmi_spam.c
-dane.o: $(HDRS) dane.c dane-gnu.c dane-openssl.c
+dane.o: $(HDRS) dane.c dane-openssl.c
dcc.o: $(HDRS) dcc.h dcc.c
dmarc.o: $(HDRS) pdkim/pdkim.h dmarc.h dmarc.c
imap_utf7.o: $(HDRS) imap_utf7.c