X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/eb27621d8f311d98375e6e263958f996b69add88..ec2a355fdc961aba7ace27c624c01accd58dc1ed:/src/OS/Makefile-Base?ds=inline diff --git a/src/OS/Makefile-Base b/src/OS/Makefile-Base index 96b19cbad..cab56cc38 100644 --- a/src/OS/Makefile-Base +++ b/src/OS/Makefile-Base @@ -5,7 +5,7 @@ # 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 1995 - 2021 SHELL = $(MAKE_SHELL) SCRIPTS = ../scripts @@ -36,9 +36,9 @@ FE = $(FULLECHO) # 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.c -checklocalmake: +checklocalmake: @if $(SHELL) $(SCRIPTS)/newer $(EDITME)-$(OSTYPE) $(EDITME) || \ $(SHELL) $(SCRIPTS)/newer $(EDITME)-$(ARCHTYPE) $(EDITME) || \ $(SHELL) $(SCRIPTS)/newer $(EDITME)-$(OSTYPE)-$(ARCHTYPE) $(EDITME); \ @@ -79,24 +79,9 @@ Makefile: ../OS/Makefile-Base ../OS/Makefile-Default \ # Build (link) the os.h file -#os.h: $(SCRIPTS)/Configure-os.h \ -# $(O)/os.h-AIX $(O)/os.h-BSDI $(O)/os.h-cygwin \ -# $(O)/os.h-Darwin $(O)/os.h-DGUX $(O)/os.h-DragonFly \ -# $(O)/os.h-FreeBSD $(O)/os.h-GNU $(O)/os.h-GNUkFreeBSD \ -# $(O)/os.h-GNUkNetBSD $(O)/os.h-HI-OSF \ -# $(O)/os.h-HI-UX $(O)/os.h-HP-UX $(O)/os.h-HP-UX-9 \ -# $(O)/os.h-IRIX $(O)/os.h-IRIX6 $(O)/os.h-IRIX632 \ -# $(O)/os.h-IRIX65 $(O)/os.h-Linux $(O)/os.h-mips \ -# $(O)/os.h-NetBSD $(O)/os.h-NetBSD-a.out \ -# $(O)/os.h-OpenBSD $(O)/os.h-OpenUNIX $(O)/os.h-OSF1 \ -# $(O)/os.h-QNX $(O)/os.h-SCO $(O)/os.h-SCO_SV \ -# $(O)/os.h-SunOS4 $(O)/os.h-SunOS5 $(O)/os.h-SunOS5-hal \ -# $(O)/os.h-ULTRIX $(O)/os.h-UNIX_SV \ -# $(O)/os.h-Unixware7 $(O)/os.h-USG -# $(SHELL) $(SCRIPTS)/Configure-os.h - os.h: $(SCRIPTS)/Configure-os.h \ $(O)/os.h-FreeBSD \ + $(O)/os.h-GNU \ $(O)/os.h-Linux \ $(O)/os.h-OpenBSD \ $(O)/os.h-SunOS5 @@ -104,16 +89,12 @@ os.h: $(SCRIPTS)/Configure-os.h \ # Build the os.c file -#os.c: ../src/os.c \ -# $(SCRIPTS)/Configure-os.c \ -# $(O)/os.c-cygwin $(O)/os.c-GNU $(O)/os.c-HI-OSF \ -# $(O)/os.c-IRIX $(O)/os.c-IRIX6 $(O)/os.c-IRIX632 \ -# $(O)/os.c-IRIX65 $(O)/os.c-Linux $(O)/os.c-OSF1 -# $(SHELL) $(SCRIPTS)/Configure-os.c - os.c: ../src/os.c \ $(SCRIPTS)/Configure-os.c \ - $(O)/os.c-Linux + $(O)/os.c-FreeBSD \ + $(O)/os.c-GNU \ + $(O)/os.c-Linux \ + $(O)/os.c-SunOS5 $(SHELL) $(SCRIPTS)/Configure-os.c # Build the config.h file. @@ -123,108 +104,128 @@ config.h: Makefile buildconfig ../src/config.h.defaults $(EDITME) # Build the builtin-macros data struct -MACRO_HSRC = macro_predef.h os.h globals.h config.h \ +MACRO_HSRC = macro_predef.h os.h globals.h config.h macros.h \ routers/accept.h routers/dnslookup.h routers/ipliteral.h \ routers/iplookup.h routers/manualroute.h routers/queryprogram.h \ routers/redirect.h OBJ_MACRO = macro_predef.o \ macro-globals.o macro-readconf.o macro-route.o macro-transport.o macro-drtables.o \ + macro-acl.o macro-tls.o \ macro-appendfile.o macro-autoreply.o macro-lmtp.o macro-pipe.o macro-queuefile.o \ 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-heimdal_gssapi.o macro-plaintext.o macro-spa.o macro-authtls.o macro-external.o \ + macro-dkim.o macro-malware.o macro-signing.o $(OBJ_MACRO): $(MACRO_HSRC) macro_predef.o : macro_predef.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF macro_predef.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ macro_predef.c macro-globals.o : globals.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF globals.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ globals.c macro-readconf.o : readconf.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF readconf.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ readconf.c macro-route.o : route.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF route.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ route.c macro-transport.o: transport.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF transport.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transport.c macro-drtables.o : drtables.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF drtables.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ drtables.c +macro-acl.o: acl.c + @echo "$(CC) -DMACRO_PREDEF acl.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ acl.c +macro-tls.o: tls.c tls-gnu.c tls-openssl.c + @echo "$(CC) -DMACRO_PREDEF tls.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ tls.c macro-appendfile.o : transports/appendfile.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF transports/appendfile.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/appendfile.c macro-autoreply.o : transports/autoreply.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF transports/autoreply.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/autoreply.c macro-lmtp.o: transports/lmtp.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF transports/lmtp.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/lmtp.c macro-pipe.o : transports/pipe.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF transports/pipe.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/pipe.c macro-queuefile.o : transports/queuefile.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF transports/queuefile.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/queuefile.c macro-smtp.o : transports/smtp.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF transports/smtp.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/smtp.c macro-accept.o : routers/accept.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF routers/accept.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/accept.c macro-dnslookup.o : routers/dnslookup.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF routers/dnslookup.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/dnslookup.c macro-ipliteral.o : routers/ipliteral.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF routers/ipliteral.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/ipliteral.c macro-iplookup.o : routers/iplookup.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF routers/iplookup.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/iplookup.c macro-manualroute.o : routers/manualroute.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF routers/manualroute.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/manualroute.c macro-queryprogram.o : routers/queryprogram.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF routers/queryprogram.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/queryprogram.c macro-redirect.o : routers/redirect.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF routers/redirect.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/redirect.c macro-auth-spa.o : auths/auth-spa.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF auths/auth-spa.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/auth-spa.c macro-cram_md5.o : auths/cram_md5.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF auths/cram_md5.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/cram_md5.c macro-cyrus_sasl.o : auths/cyrus_sasl.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF auths/cyrus_sasl.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/cyrus_sasl.c macro-dovecot.o: auths/dovecot.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF auths/dovecot.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/dovecot.c +macro-external.o: auths/external.c + @echo "$(CC) -DMACRO_PREDEF auths/external.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/external.c macro-gsasl_exim.o : auths/gsasl_exim.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF auths/gsasl_exim.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/gsasl_exim.c macro-heimdal_gssapi.o: auths/heimdal_gssapi.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF auths/heimdal_gssapi.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/heimdal_gssapi.c macro-plaintext.o : auths/plaintext.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF auths/plaintext.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/plaintext.c macro-spa.o : auths/spa.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< -macro-tls.o: auths/tls.c - @echo "$(CC) -DMACRO_PREDEF $<" - $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ $< + @echo "$(CC) -DMACRO_PREDEF auths/spa.c" + $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/spa.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-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 $<" + @echo "$(LNCC) -o $@" $(FE)$(LNCC) -o $@ $(LFLAGS) $(OBJ_MACRO) macro.c: macro_predef @@ -256,7 +257,7 @@ buildconfig: buildconfig.c # 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" \ @@ -273,6 +274,8 @@ exicyclog: config ../src/exicyclog.src -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 @@ -281,13 +284,15 @@ exicyclog: config ../src/exicyclog.src # 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 @@ -296,7 +301,7 @@ exinext: config ../src/exinext.src # 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" \ @@ -309,6 +314,9 @@ exiwhat: config ../src/exiwhat.src -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 @@ -317,7 +325,7 @@ exiwhat: config ../src/exiwhat.src # 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" \ @@ -325,6 +333,8 @@ exim_checkaccess: config ../src/exim_checkaccess.src -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 @@ -335,7 +345,7 @@ eximon: config ../src/eximon.src ../OS/eximon.conf-Default \ ../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" \ @@ -345,85 +355,108 @@ eximon: config ../src/eximon.src ../OS/eximon.conf-Default \ -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 @@ -435,14 +468,14 @@ convert4r4: Makefile ../src/convert4r4.src # are thrown away by the linker. 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 +OBJ_EXPERIMENTAL = arc.o \ + bmi_spam.o \ + dane.o \ + dcc.o \ + dmarc.o \ + imap_utf7.o \ + spf.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. @@ -451,9 +484,9 @@ 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 \ - os.o parse.o queue.o \ + filtertest.o globals.o dkim.o dkim_transport.o dnsbl.o hash.o \ + header.o host.o ip.o log.o lss.o match.o md5.o moan.o \ + os.o parse.o priv.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 \ @@ -498,12 +531,12 @@ exim_dumpdb: $(OBJ_DUMPDB) # The utility for interrogating/fixing the contents of an exim database -OBJ_FIXDB = exim_fixdb.o util-os.o util-store.o +OBJ_FIXDB = exim_fixdb.o util-os.o util-store.o util-md5.o -exim_fixdb: $(OBJ_FIXDB) buildauths +exim_fixdb: $(OBJ_FIXDB) @echo "$(LNCC) -o exim_fixdb" $(FE)$(LNCC) $(CFLAGS) $(INCLUDE) -o exim_fixdb $(LFLAGS) $(OBJ_FIXDB) \ - auths/auths.a $(LIBS) $(EXTRALIBS) $(DBMLIB) + $(LIBS) $(EXTRALIBS) $(DBMLIB) @if [ x"$(STRIP_COMMAND)" != x"" ]; then \ echo $(STRIP_COMMAND) exim_fixdb; \ $(STRIP_COMMAND) exim_fixdb; \ @@ -573,11 +606,11 @@ OBJ_MONBIN = util-spool_in.o \ util-string.o \ util-queue.o \ util-tod.o \ - tree.o \ + util-tree.o \ $(MONBIN) -eximon.bin: $(EXIMON_EDITME) eximon $(OBJ_MONBIN) \ - ../exim_monitor/em_version.c +eximon.bin: $(EXIMON_EDITME) eximon $(OBJ_MONBIN) ../exim_monitor/em_version.c \ + mytypes.h store.h macros.h @echo "$(CC) exim_monitor/em_version.c" $(FE)$(CC) -o em_version.o -c \ $(CFLAGS) $(XINCLUDE) -I. ../exim_monitor/em_version.c @@ -602,11 +635,12 @@ eximon.bin: $(EXIMON_EDITME) eximon $(OBJ_MONBIN) \ HDRS = blob.h \ config.h \ dbfunctions.h \ - dbstuff.h \ exim.h \ functions.h \ globals.h \ hash.h \ + hintsdb.h \ + hintsdb_structs.h \ local_scan.h \ macros.h \ mytypes.h \ @@ -615,10 +649,11 @@ HDRS = blob.h \ os.h PHDRS = ../config.h \ ../dbfunctions.h \ - ../dbstuff.h \ ../exim.h \ ../functions.h \ ../globals.h \ + ../hintsdb.h \ + ../hintsdb_structs.h \ ../local_scan.h \ ../macros.h \ ../mytypes.h \ @@ -629,11 +664,14 @@ PHDRS = ../config.h \ .c.o:; @echo "$(CC) $*.c" $(FE)$(CC) -c $(CFLAGS) -I. $(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE) $*.c -# Update Exim's version information and build the version object. +# Update Exim's version information and build the version object. The dependency +# chain here avoids problems under parallel-make. -version.h:: +version.sh: @../scripts/reversion +version.h: version.sh + cnumber.h: version.h version.o: $(HDRS) cnumber.h version.h version.c @@ -695,6 +733,10 @@ util-string.o: $(HDRS) string.c @echo "$(CC) -DCOMPILE_UTILITY string.c" $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-string.o string.c +util-md5.o: $(HDRS) md5.c + @echo "$(CC) -DCOMPILE_UTILITY queue.c" + $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-md5.o md5.c + util-queue.o: $(HDRS) queue.c @echo "$(CC) -DCOMPILE_UTILITY queue.c" $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-queue.o queue.c @@ -703,6 +745,10 @@ util-tod.o: $(HDRS) tod.c @echo "$(CC) -DCOMPILE_UTILITY tod.c" $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-tod.o tod.c +util-tree.o: $(HDRS) tree.c + @echo "$(CC) -DCOMPILE_UTILITY tree.c" + $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-tree.o tree.c + util-os.o: $(HDRS) os.c @echo "$(CC) -DCOMPILE_UTILITY os.c" $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) \ @@ -716,7 +762,7 @@ util-os.o: $(HDRS) os.c local_scan.o: config local_scan.h ../$(LOCAL_SCAN_SOURCE) @echo "$(CC) local_scan.c" - $(FE)$(CC) -c $(CFLAGS) -I. $(INCLUDE) -o local_scan.o ../$(LOCAL_SCAN_SOURCE) + $(FE)$(CC) -DLOCAL_SCAN -c $(CFLAGS) -I. $(INCLUDE) -o local_scan.o ../$(LOCAL_SCAN_SOURCE) # Dependencies for the "ordinary" exim modules @@ -730,6 +776,7 @@ debug.o: $(HDRS) debug.c deliver.o: $(HDRS) transports/smtp.h deliver.c directory.o: $(HDRS) directory.c dns.o: $(HDRS) dns.c +dnsbl.o: $(HDRS) dnsbl.c enq.o: $(HDRS) enq.c exim.o: $(HDRS) exim.c expand.o: $(HDRS) expand.c @@ -744,9 +791,11 @@ ip.o: $(HDRS) ip.c log.o: $(HDRS) log.c lss.o: $(HDRS) lss.c match.o: $(HDRS) match.c +md5.o: $(HDRS) md5.c moan.o: $(HDRS) moan.c os.o: $(HDRS) $(OS_C_INCLUDES) os.c parse.o: $(HDRS) parse.c +priv.o: $(HDRS) priv.c queue.o: $(HDRS) queue.c rda.o: $(HDRS) rda.c readconf.o: $(HDRS) readconf.c @@ -766,7 +815,8 @@ store.o: $(HDRS) store.c string.o: $(HDRS) string.c tls.o: $(HDRS) tls.c \ tls-gnu.c tlscert-gnu.c \ - tls-openssl.c tlscert-openssl.c + tls-openssl.c tlscert-openssl.c \ + tls-cipher-stdname.c tod.o: $(HDRS) tod.c transport.o: $(HDRS) transport.c tree.o: $(HDRS) tree.c @@ -785,13 +835,13 @@ spool_mbox.o: $(HDRS) spool_mbox.c # Dependencies for EXPERIMENTAL_* modules +arc.o: $(HDRS) pdkim/pdkim.h arc.c 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 spf.o: $(HDRS) spf.h spf.c -srs.o: $(HDRS) srs.h srs.c utf8.o: $(HDRS) utf8.c # The module containing tables of available lookups, routers, auths, and @@ -827,9 +877,9 @@ em_text.o: ../exim_monitor/em_text.c ../exim_monitor/em_hdr.h em_xs.o: ../exim_monitor/em_xs.c ../exim_monitor/em_hdr.h em_version.o: ../exim_monitor/em_version.c ../exim_monitor/em_hdr.h $(MONBIN): $(HDRS) - @echo "$(CC) exim_monitor/`echo $@ | sed 's/o$$/c/'`" - $(FE)$(CC) -o $@ -c $(CFLAGS) -I. -I../exim_monitor $(INCLUDE) $(XINCLUDE) \ - ../exim_monitor/`echo $@ | sed 's/o$$/c/'` + @echo "$(CC) exim_monitor/$(@:.o=.c)" + $(FE)$(CC) -o $@ -c $(CFLAGS) -DCOMPILE_UTILITY -I. -I../exim_monitor $(INCLUDE) $(XINCLUDE) \ + ../exim_monitor/$(@:.o=.c) # Targets for the various libraries that Exim uses.