1# 2# Makefile for sendmail base directory 3# 4# @(#)Makefile 4.12 06/21/87 5# 6 7ALL= src/sendmail 8DIRS= $(DESTDIR)/usr/spool/mqueue 9SRCDIR= $(DESTDIR)/usr/src/usr.lib/sendmail 10ALLDIRS=include adm src aux md lib doc adb test 11BACKUP= calder 12SENDMAIL=$(DESTDIR)/usr/lib/sendmail 13SYSLOG= /usr/spool/mqueue/syslog 14HOST= `hostname | sed -e 's/ucb//' -e 's/\..*//'` 15 16# When hardlinks are used, the references to LN below will need changes 17# for DESTDIR != / 18LN= ln -s 19CP= cp 20 21all: 22 cd lib; make ${MFLAGS} 23 cd src; m4 Makefile.m4 > Makefile; make ${MFLAGS} 24 -cd aux; m4 Makefile.m4 > Makefile; make ${MFLAGS} 25# cd doc; make ${MFLAGS} 26 27install: 28 install -s -o root -g kmem -m 6755 src/sendmail $(SENDMAIL) 29 install -c -o bin -g bin -m 644 lib/sendmail.hf $(SENDMAIL).hf 30 install -c -o bin -g bin -m 666 /dev/null $(SENDMAIL).st 31 install -c -o bin -g bin -m 644 /dev/null $(SENDMAIL).fc 32 rm -f $(DESTDIR)/usr/ucb/newaliases 33 $(LN) /usr/lib/sendmail $(DESTDIR)/usr/ucb/newaliases 34 rm -f $(DESTDIR)/usr/ucb/mailq 35 $(LN) /usr/lib/sendmail $(DESTDIR)/usr/ucb/mailq 36# install -c -o root -m 644 cf/$(HOST).cf $(SENDMAIL).cf 37# install -o 1 aux/syslog $(DESTDIR)/etc/syslog 38# install -c -o 1 -m 644 aux/syslog.conf $(DESTDIR)/etc/syslog.conf 39# install -c -o 1 -m 644 /dev/null $(DESTDIR)/etc/syslog.pid 40# install -c -o 1 -m 644 /dev/null $(DESTDIR)$(SYSLOG) 41# for i in 0 1 2 3 4 5 6 7; do install -c -o 1 -m 644 /dev/null $(DESTDIR)$(SYSLOG).$$i; done 42# install -c -o 1 lib/newsyslog.sh $(DESTDIR)/usr/adm/newsyslog 43# echo '5 4 * * * sh /usr/adm/newsyslog' >> $(DESTDIR)/usr/lib/crontab 44 45installcf: 46 install -c -o bin -g bin -m 644 cf/$(HOST).cf $(SENDMAIL).cf 47 48src/sendmail: 49 cd src; make ${MFLAGS} sendmail 50 51aux/syslog: 52 -cd aux; make ${MFLAGS} syslog 53 54$(DESTDIR)/usr/spool/mqueue: 55 mkdir $(DESTDIR)/usr/spool/mqueue 56 chmod 777 $(DESTDIR)/usr/spool/mqueue 57 58clean: 59 -cd src; make ${MFLAGS} clean 60 -cd aux; make ${MFLAGS} clean 61 -cd lib; make ${MFLAGS} clean 62 -cd doc; make ${MFLAGS} clean 63 64depend: 65 66dirs: 67 mkdir $(SRCROOT) 68 cd $(SRCROOT); mkdir $(ALLDIRS) 69 70rcp: 71 rsh $(BACKUP) mkdir sendmail 72 rsh $(BACKUP) 'cd sendmail; mkdir $(ALLDIRS)' 73 for i in `cat FILES`; do rcp $$i $(BACKUP):sendmail/$$i; done 74 75srcinstall: 76 for i in `cat FILES`; do rm -f $(SRCDIR)/$$i; cp $$i $(SRCDIR)/$$i; done 77 78tar: 79 rm -f sendmail.tar 80 tar rcfh sendmail.tar `cat FILES` 81