Makefile revision 132943
1223828Sneel# 2223828Sneel# Makefile for configuration files. 3223828Sneel# 4223828Sneel# $Id: Makefile,v 8.58 2003/10/20 22:01:00 ca Exp $ 5223828Sneel# 6223828Sneel 7223828Sneel# 8223828Sneel# Create configuration files using "m4 ../m4/cf.m4 file.mc > file.cf"; 9223828Sneel# this may be easier than tweaking the Makefile. You do need to 10223828Sneel# have a fairly modern M4 available (GNU m4 works). On SunOS, use 11223828Sneel# /usr/5bin/m4. 12223828Sneel# 13223828Sneel 14223828Sneel# name of source for sendmail.cf (without extension) 15223828SneelCF= sendmail 16223828Sneel# name of source for submit.cf (without extension) 17223828SneelSUBMIT= submit 18223828Sneel# directory for .cf files 19223828SneelMAILDIR=/etc/mail 20223828SneelM4= m4 21223828SneelCFDIR= .. 22223828SneelSED= sed 23223828SneelECHO= echo 24223828SneelCHMOD= chmod 25223828SneelROMODE= 444 26223828SneelRM= rm -f 27223828Sneel# use our own install program; should be really confINSTALL 28223828SneelINSTALL=../../devtools/bin/install.sh 29223828Sneel# CF file ownership/permissions 30223828SneelCFOWN=root 31223828SneelCFGRP=bin 32223828SneelCFMODE=0444 33223828Sneel 34223828Sneel 35223828Sneel.SUFFIXES: .mc .cf 36223828Sneel 37223828Sneel.mc.cf: 38223828Sneel $(RM) $@ 39223828Sneel $(M4) ${CFDIR}/m4/cf.m4 $*.mc > $@ || ( $(RM) $@ && exit 1 ) 40223828Sneel $(ECHO) "### $*.mc ###" >>$@ 41223828Sneel $(SED) -e 's/^/# /' $*.mc >>$@ 42223828Sneel $(CHMOD) $(ROMODE) $@ 43223828Sneel 44223828SneelGENERIC=generic-bsd4.4.cf generic-hpux9.cf generic-hpux10.cf \ 45223828Sneel generic-linux.cf generic-mpeix.cf generic-nextstep3.3.cf \ 46223828Sneel generic-osf1.cf generic-solaris.cf \ 47223828Sneel generic-sunos4.1.cf generic-ultrix4.cf 48223828SneelBERKELEY=cs-hpux9.cf cs-hpux10.cf cs-osf1.cf cs-solaris.cf \ 49223828Sneel cs-sunos4.1.cf cs-ultrix4.cf \ 50223828Sneel s2k-osf1.cf s2k-ultrix4.cf \ 51223828Sneel chez.cs.cf huginn.cs.cf mail.cs.cf mail.eecs.cf mailspool.cs.cf \ 52223828Sneel python.cs.cf ucbarpa.cf ucbvax.cf vangogh.cs.cf 53223828SneelOTHER= knecht.cf 54223828SneelALL= submit.cf $(GENERIC) $(OTHER) 55223828Sneel 56223828Sneelall: $(ALL) 57223828Sneel 58223828Sneelberkeley: $(BERKELEY) 59223828Sneelgeneric: $(GENERIC) 60223828Sneelother: $(OTHER) 61223828Sneel 62242882Sneelclean cleandir: 63256657Sneel $(RM) $(ALL) core 64223828Sneel 65223828Sneelinstall: 66223828Sneel @echo "Before installing the .cf files please make sure you have read the" 67223828Sneel @echo "instructions in the file ../../INSTALL. You should have prepared the" 68223828Sneel @echo "files \"submit.mc\" (supplied) and \"sendmail.mc\". Then you can use" 69223828Sneel @echo "" 70223828Sneel @echo " make install-cf" 71256176Sneel @echo "" 72223828Sneel @echo "If you use a different name than \"sendmail\" for your main .mc file" 73223828Sneel 74257018Sneel @echo "then you should use" 75223828Sneel @echo "" 76223828Sneel @echo " make install-cf CF=config" 77223828Sneel @echo "" 78223828Sneel @echo "where \"config\" is the name of your main .mc file." 79256176Sneel 80223828Sneelinstall-cf: install-sendmail-cf install-submit-cf 81223828Sneel 82223828Sneelinstall-sendmail-cf: $(CF).cf 83223828Sneel $(INSTALL) -c -o $(CFOWN) -g $(CFGRP) -m $(CFMODE) $(CF).cf ${DESTDIR}$(MAILDIR)/sendmail.cf 84223828Sneel 85223828Sneelinstall-submit-cf: $(SUBMIT).cf 86223828Sneel $(INSTALL) -c -o $(CFOWN) -g $(CFGRP) -m $(CFMODE) $(SUBMIT).cf ${DESTDIR}$(MAILDIR)/submit.cf 87223828Sneel 88223828Sneeldepend: 89223828Sneel 90223828Sneel# this is overkill, but.... 91262331SgrehanM4FILES=\ 92262331Sgrehan ${CFDIR}/domain/Berkeley.EDU.m4 \ 93258673Sgrehan ${CFDIR}/domain/CS.Berkeley.EDU.m4 \ 94223828Sneel ${CFDIR}/domain/EECS.Berkeley.EDU.m4 \ 95262331Sgrehan ${CFDIR}/domain/S2K.Berkeley.EDU.m4 \ 96262331Sgrehan ${CFDIR}/domain/berkeley-only.m4 \ 97258668Sgrehan ${CFDIR}/domain/generic.m4 \ 98223828Sneel ${CFDIR}/feature/accept_unqualified_senders.m4 \ 99248477Sneel ${CFDIR}/feature/accept_unresolvable_domains.m4 \ 100223828Sneel ${CFDIR}/feature/access_db.m4 \ 101223828Sneel ${CFDIR}/feature/allmasquerade.m4 \ 102223828Sneel ${CFDIR}/feature/always_add_domain.m4 \ 103223828Sneel ${CFDIR}/feature/bestmx_is_local.m4 \ 104223828Sneel ${CFDIR}/feature/bitdomain.m4 \ 105223828Sneel ${CFDIR}/feature/blacklist_recipients.m4 \ 106223828Sneel ${CFDIR}/feature/conncontrol.m4 \ 107223828Sneel ${CFDIR}/feature/dnsbl.m4 \ 108223828Sneel ${CFDIR}/feature/domaintable.m4 \ 109223828Sneel ${CFDIR}/feature/generics_entire_domain.m4 \ 110223828Sneel ${CFDIR}/feature/genericstable.m4 \ 111223828Sneel ${CFDIR}/feature/ldap_routing.m4 \ 112223828Sneel ${CFDIR}/feature/limited_masquerade.m4 \ 113223828Sneel ${CFDIR}/feature/local_lmtp.m4 \ 114223828Sneel ${CFDIR}/feature/local_procmail.m4 \ 115258668Sgrehan ${CFDIR}/feature/loose_relay_check.m4 \ 116223828Sneel ${CFDIR}/feature/mailertable.m4 \ 117223828Sneel ${CFDIR}/feature/masquerade_entire_domain.m4 \ 118223828Sneel ${CFDIR}/feature/masquerade_envelope.m4 \ 119223828Sneel ${CFDIR}/feature/no_default_msa.m4 \ 120223828Sneel ${CFDIR}/feature/nocanonify.m4 \ 121223828Sneel ${CFDIR}/feature/notsticky.m4 \ 122223828Sneel ${CFDIR}/feature/nouucp.m4 \ 123258668Sgrehan ${CFDIR}/feature/nullclient.m4 \ 124223828Sneel ${CFDIR}/feature/promiscuous_relay.m4 \ 125223828Sneel ${CFDIR}/feature/redirect.m4 \ 126223828Sneel ${CFDIR}/feature/ratecontrol.m4 \ 127223828Sneel ${CFDIR}/feature/relay_based_on_MX.m4 \ 128223828Sneel ${CFDIR}/feature/relay_entire_domain.m4 \ 129223828Sneel ${CFDIR}/feature/relay_hosts_only.m4 \ 130223828Sneel ${CFDIR}/feature/relay_local_from.m4 \ 131223828Sneel ${CFDIR}/feature/relay_mail_from.m4 \ 132223828Sneel ${CFDIR}/feature/smrsh.m4 \ 133258668Sgrehan ${CFDIR}/feature/stickyhost.m4 \ 134223828Sneel ${CFDIR}/feature/use_ct_file.m4 \ 135223828Sneel ${CFDIR}/feature/use_cw_file.m4 \ 136223828Sneel ${CFDIR}/feature/uucpdomain.m4 \ 137223828Sneel ${CFDIR}/feature/virtuser_entire_domain.m4 \ 138223828Sneel ${CFDIR}/feature/virtusertable.m4 \ 139223828Sneel ${CFDIR}/hack/cssubdomain.m4 \ 140223828Sneel ${CFDIR}/m4/cf.m4 \ 141223828Sneel ${CFDIR}/m4/cfhead.m4 \ 142223828Sneel ${CFDIR}/m4/proto.m4 \ 143223828Sneel ${CFDIR}/m4/version.m4 \ 144223828Sneel ${CFDIR}/mailer/cyrus.m4 \ 145223828Sneel ${CFDIR}/mailer/fax.m4 \ 146223828Sneel ${CFDIR}/mailer/local.m4 \ 147223828Sneel ${CFDIR}/mailer/mail11.m4 \ 148223828Sneel ${CFDIR}/mailer/phquery.m4 \ 149223828Sneel ${CFDIR}/mailer/pop.m4 \ 150223828Sneel ${CFDIR}/mailer/procmail.m4 \ 151223828Sneel ${CFDIR}/mailer/qpage.m4 \ 152223828Sneel ${CFDIR}/mailer/smtp.m4 \ 153223828Sneel ${CFDIR}/mailer/usenet.m4 \ 154223828Sneel ${CFDIR}/mailer/uucp.m4 \ 155223828Sneel ${CFDIR}/ostype/aix3.m4 \ 156223828Sneel ${CFDIR}/ostype/aix4.m4 \ 157223828Sneel ${CFDIR}/ostype/altos.m4 \ 158223828Sneel ${CFDIR}/ostype/amdahl-uts.m4 \ 159223828Sneel ${CFDIR}/ostype/a-ux.m4 \ 160223828Sneel ${CFDIR}/ostype/bsd4.3.m4 \ 161223828Sneel ${CFDIR}/ostype/bsd4.4.m4 \ 162223828Sneel ${CFDIR}/ostype/bsdi.m4 \ 163223828Sneel ${CFDIR}/ostype/bsdi1.0.m4 \ 164223828Sneel ${CFDIR}/ostype/bsdi2.0.m4 \ 165223828Sneel ${CFDIR}/ostype/dgux.m4 \ 166223828Sneel ${CFDIR}/ostype/domainos.m4 \ 167223828Sneel ${CFDIR}/ostype/dynix3.2.m4 \ 168223828Sneel ${CFDIR}/ostype/freebsd4.m4 \ 169223828Sneel ${CFDIR}/ostype/freebsd5.m4 \ 170223828Sneel ${CFDIR}/ostype/gnu.m4 \ 171297599Spfg ${CFDIR}/ostype/hpux10.m4 \ 172223828Sneel ${CFDIR}/ostype/hpux11.m4 \ 173223828Sneel ${CFDIR}/ostype/hpux9.m4 \ 174223828Sneel ${CFDIR}/ostype/irix4.m4 \ 175223828Sneel ${CFDIR}/ostype/irix5.m4 \ 176223828Sneel ${CFDIR}/ostype/irix6.m4 \ 177223828Sneel ${CFDIR}/ostype/isc4.1.m4 \ 178223828Sneel ${CFDIR}/ostype/linux.m4 \ 179223828Sneel ${CFDIR}/ostype/maxion.m4 \ 180223828Sneel ${CFDIR}/ostype/mklinux.m4 \ 181223828Sneel ${CFDIR}/ostype/mpeix.m4 \ 182223828Sneel ${CFDIR}/ostype/nextstep.m4 \ 183223828Sneel ${CFDIR}/ostype/openbsd.m4 \ 184223828Sneel ${CFDIR}/ostype/osf1.m4 \ 185223828Sneel ${CFDIR}/ostype/powerux.m4 \ 186223828Sneel ${CFDIR}/ostype/ptx2.m4 \ 187223828Sneel ${CFDIR}/ostype/qnx.m4 \ 188223828Sneel ${CFDIR}/ostype/riscos4.5.m4 \ 189223828Sneel ${CFDIR}/ostype/sco-uw-2.1.m4 \ 190223828Sneel ${CFDIR}/ostype/sco3.2.m4 \ 191223828Sneel ${CFDIR}/ostype/sinix.m4 \ 192223828Sneel ${CFDIR}/ostype/solaris2.m4 \ 193223828Sneel ${CFDIR}/ostype/solaris2.ml.m4 \ 194223828Sneel ${CFDIR}/ostype/solaris2.pre5.m4 \ 195223828Sneel ${CFDIR}/ostype/solaris8.m4 \ 196223828Sneel ${CFDIR}/ostype/sunos3.5.m4 \ 197223828Sneel ${CFDIR}/ostype/sunos4.1.m4 \ 198223828Sneel ${CFDIR}/ostype/svr4.m4 \ 199223828Sneel ${CFDIR}/ostype/ultrix4.m4 \ 200223828Sneel ${CFDIR}/ostype/unixware7.m4 \ 201223828Sneel ${CFDIR}/ostype/unknown.m4 \ 202223828Sneel ${CFDIR}/ostype/uxpds.m4 203223828Sneel 204223828Sneel$(ALL): $(M4FILES) 205223828Sneel$(BERKELEY): $(M4FILES) 206223828Sneel$(GENERIC): $(M4FILES) 207223828Sneel$(OTHER): $(M4FILES) 208223828Sneel