1# 2# Makefile for configuration files. 3# 4# $Id: Makefile,v 8.60 2005-06-14 02:16:34 gshapiro Exp $ 5# 6 7# 8# Create configuration files using "m4 ../m4/cf.m4 file.mc > file.cf"; 9# this may be easier than tweaking the Makefile. You do need to 10# have a fairly modern M4 available (GNU m4 works). On SunOS, use 11# /usr/5bin/m4. 12# 13 14# name of source for sendmail.cf (without extension) 15CF= sendmail 16# name of source for submit.cf (without extension) 17SUBMIT= submit 18# directory for .cf files 19MAILDIR=/etc/mail 20M4= m4 21CFDIR= .. 22SED= sed 23ECHO= echo 24CHMOD= chmod 25ROMODE= 444 26RM= rm -f 27# use our own install program; should be really confINSTALL 28INSTALL=../../devtools/bin/install.sh 29# CF file ownership/permissions 30CFOWN=root 31CFGRP=bin 32CFMODE=0444 33 34 35.SUFFIXES: .mc .cf 36 37.mc.cf: 38 $(RM) $@ 39 $(M4) ${CFDIR}/m4/cf.m4 $*.mc > $@ || ( $(RM) $@ && exit 1 ) 40 $(ECHO) "### $*.mc ###" >>$@ 41 $(SED) -e 's/^/# /' $*.mc >>$@ 42 $(CHMOD) $(ROMODE) $@ 43 44GENERIC=generic-bsd4.4.cf generic-hpux9.cf generic-hpux10.cf \ 45 generic-linux.cf generic-mpeix.cf generic-nextstep3.3.cf \ 46 generic-osf1.cf generic-solaris.cf \ 47 generic-sunos4.1.cf generic-ultrix4.cf 48BERKELEY=cs-hpux9.cf cs-hpux10.cf cs-osf1.cf cs-solaris.cf \ 49 cs-sunos4.1.cf cs-ultrix4.cf \ 50 s2k-osf1.cf s2k-ultrix4.cf \ 51 chez.cs.cf huginn.cs.cf mail.cs.cf mail.eecs.cf mailspool.cs.cf \ 52 python.cs.cf ucbarpa.cf ucbvax.cf vangogh.cs.cf 53OTHER= knecht.cf 54ALL= submit.cf $(GENERIC) $(OTHER) 55 56all: $(ALL) 57 58berkeley: $(BERKELEY) 59generic: $(GENERIC) 60other: $(OTHER) 61 62clean cleandir: 63 $(RM) $(ALL) core 64 65install: 66 @echo "Before installing the .cf files please make sure you have read the" 67 @echo "instructions in the file ../../INSTALL. You should have prepared the" 68 @echo "files \"submit.mc\" (supplied) and \"sendmail.mc\". Then you can use" 69 @echo "" 70 @echo " make install-cf" 71 @echo "" 72 @echo "If you use a different name than \"sendmail\" for your main .mc file" 73 74 @echo "then you should use" 75 @echo "" 76 @echo " make install-cf CF=config" 77 @echo "" 78 @echo "where \"config\" is the name of your main .mc file." 79 80install-cf: install-sendmail-cf install-submit-cf 81 82install-sendmail-cf: $(CF).cf 83 $(INSTALL) -c -o $(CFOWN) -g $(CFGRP) -m $(CFMODE) $(CF).cf ${DESTDIR}$(MAILDIR)/sendmail.cf 84 85install-submit-cf: $(SUBMIT).cf 86 $(INSTALL) -c -o $(CFOWN) -g $(CFGRP) -m $(CFMODE) $(SUBMIT).cf ${DESTDIR}$(MAILDIR)/submit.cf 87 88depend: 89 90# this is overkill, but.... 91M4FILES=\ 92 ${CFDIR}/domain/Berkeley.EDU.m4 \ 93 ${CFDIR}/domain/CS.Berkeley.EDU.m4 \ 94 ${CFDIR}/domain/EECS.Berkeley.EDU.m4 \ 95 ${CFDIR}/domain/S2K.Berkeley.EDU.m4 \ 96 ${CFDIR}/domain/berkeley-only.m4 \ 97 ${CFDIR}/domain/generic.m4 \ 98 ${CFDIR}/feature/accept_unqualified_senders.m4 \ 99 ${CFDIR}/feature/accept_unresolvable_domains.m4 \ 100 ${CFDIR}/feature/access_db.m4 \ 101 ${CFDIR}/feature/allmasquerade.m4 \ 102 ${CFDIR}/feature/always_add_domain.m4 \ 103 ${CFDIR}/feature/bcc.m4 \ 104 ${CFDIR}/feature/bestmx_is_local.m4 \ 105 ${CFDIR}/feature/bitdomain.m4 \ 106 ${CFDIR}/feature/blocklist_recipients.m4 \ 107 ${CFDIR}/feature/conncontrol.m4 \ 108 ${CFDIR}/feature/dnsbl.m4 \ 109 ${CFDIR}/feature/domaintable.m4 \ 110 ${CFDIR}/feature/generics_entire_domain.m4 \ 111 ${CFDIR}/feature/genericstable.m4 \ 112 ${CFDIR}/feature/ldap_routing.m4 \ 113 ${CFDIR}/feature/limited_masquerade.m4 \ 114 ${CFDIR}/feature/local_lmtp.m4 \ 115 ${CFDIR}/feature/local_procmail.m4 \ 116 ${CFDIR}/feature/loose_relay_check.m4 \ 117 ${CFDIR}/feature/mailertable.m4 \ 118 ${CFDIR}/feature/masquerade_entire_domain.m4 \ 119 ${CFDIR}/feature/masquerade_envelope.m4 \ 120 ${CFDIR}/feature/no_default_msa.m4 \ 121 ${CFDIR}/feature/nocanonify.m4 \ 122 ${CFDIR}/feature/nopercenthack.m4 \ 123 ${CFDIR}/feature/notsticky.m4 \ 124 ${CFDIR}/feature/nouucp.m4 \ 125 ${CFDIR}/feature/nullclient.m4 \ 126 ${CFDIR}/feature/prefixmod.m4 \ 127 ${CFDIR}/feature/promiscuous_relay.m4 \ 128 ${CFDIR}/feature/redirect.m4 \ 129 ${CFDIR}/feature/ratecontrol.m4 \ 130 ${CFDIR}/feature/relay_based_on_MX.m4 \ 131 ${CFDIR}/feature/relay_entire_domain.m4 \ 132 ${CFDIR}/feature/relay_hosts_only.m4 \ 133 ${CFDIR}/feature/relay_local_from.m4 \ 134 ${CFDIR}/feature/relay_mail_from.m4 \ 135 ${CFDIR}/feature/smrsh.m4 \ 136 ${CFDIR}/feature/stickyhost.m4 \ 137 ${CFDIR}/feature/tls_session_features.m4 \ 138 ${CFDIR}/feature/use_ct_file.m4 \ 139 ${CFDIR}/feature/use_cw_file.m4 \ 140 ${CFDIR}/feature/uucpdomain.m4 \ 141 ${CFDIR}/feature/virtuser_entire_domain.m4 \ 142 ${CFDIR}/feature/virtusertable.m4 \ 143 ${CFDIR}/hack/cssubdomain.m4 \ 144 ${CFDIR}/hack/xconnect.m4 \ 145 ${CFDIR}/m4/cf.m4 \ 146 ${CFDIR}/m4/cfhead.m4 \ 147 ${CFDIR}/m4/proto.m4 \ 148 ${CFDIR}/m4/version.m4 \ 149 ${CFDIR}/mailer/cyrus.m4 \ 150 ${CFDIR}/mailer/fax.m4 \ 151 ${CFDIR}/mailer/local.m4 \ 152 ${CFDIR}/mailer/mail11.m4 \ 153 ${CFDIR}/mailer/phquery.m4 \ 154 ${CFDIR}/mailer/pop.m4 \ 155 ${CFDIR}/mailer/procmail.m4 \ 156 ${CFDIR}/mailer/qpage.m4 \ 157 ${CFDIR}/mailer/smtp.m4 \ 158 ${CFDIR}/mailer/usenet.m4 \ 159 ${CFDIR}/mailer/uucp.m4 \ 160 ${CFDIR}/ostype/aix3.m4 \ 161 ${CFDIR}/ostype/aix4.m4 \ 162 ${CFDIR}/ostype/altos.m4 \ 163 ${CFDIR}/ostype/amdahl-uts.m4 \ 164 ${CFDIR}/ostype/a-ux.m4 \ 165 ${CFDIR}/ostype/bsd4.3.m4 \ 166 ${CFDIR}/ostype/bsd4.4.m4 \ 167 ${CFDIR}/ostype/bsdi.m4 \ 168 ${CFDIR}/ostype/bsdi1.0.m4 \ 169 ${CFDIR}/ostype/bsdi2.0.m4 \ 170 ${CFDIR}/ostype/dgux.m4 \ 171 ${CFDIR}/ostype/domainos.m4 \ 172 ${CFDIR}/ostype/dragonfly.m4 \ 173 ${CFDIR}/ostype/dynix3.2.m4 \ 174 ${CFDIR}/ostype/freebsd4.m4 \ 175 ${CFDIR}/ostype/freebsd5.m4 \ 176 ${CFDIR}/ostype/freebsd6.m4 \ 177 ${CFDIR}/ostype/gnu.m4 \ 178 ${CFDIR}/ostype/hpux10.m4 \ 179 ${CFDIR}/ostype/hpux11.m4 \ 180 ${CFDIR}/ostype/hpux9.m4 \ 181 ${CFDIR}/ostype/irix4.m4 \ 182 ${CFDIR}/ostype/irix5.m4 \ 183 ${CFDIR}/ostype/irix6.m4 \ 184 ${CFDIR}/ostype/isc4.1.m4 \ 185 ${CFDIR}/ostype/linux.m4 \ 186 ${CFDIR}/ostype/maxion.m4 \ 187 ${CFDIR}/ostype/mklinux.m4 \ 188 ${CFDIR}/ostype/mpeix.m4 \ 189 ${CFDIR}/ostype/nextstep.m4 \ 190 ${CFDIR}/ostype/openbsd.m4 \ 191 ${CFDIR}/ostype/osf1.m4 \ 192 ${CFDIR}/ostype/powerux.m4 \ 193 ${CFDIR}/ostype/ptx2.m4 \ 194 ${CFDIR}/ostype/qnx.m4 \ 195 ${CFDIR}/ostype/riscos4.5.m4 \ 196 ${CFDIR}/ostype/sco-uw-2.1.m4 \ 197 ${CFDIR}/ostype/sco3.2.m4 \ 198 ${CFDIR}/ostype/sinix.m4 \ 199 ${CFDIR}/ostype/solaris2.m4 \ 200 ${CFDIR}/ostype/solaris2.ml.m4 \ 201 ${CFDIR}/ostype/solaris2.pre5.m4 \ 202 ${CFDIR}/ostype/solaris8.m4 \ 203 ${CFDIR}/ostype/sunos3.5.m4 \ 204 ${CFDIR}/ostype/sunos4.1.m4 \ 205 ${CFDIR}/ostype/svr4.m4 \ 206 ${CFDIR}/ostype/ultrix4.m4 \ 207 ${CFDIR}/ostype/unixware7.m4 \ 208 ${CFDIR}/ostype/unknown.m4 \ 209 ${CFDIR}/ostype/uxpds.m4 210 211$(ALL): $(M4FILES) 212$(BERKELEY): $(M4FILES) 213$(GENERIC): $(M4FILES) 214$(OTHER): $(M4FILES) 215