Subject: Top level make problems (and others) + fixes (11 of 11 - #116) Index: src/*/{Makefile,.c} 2.11BSD Description: The process of recompiling the complete system from sources does not completely succeed, there are programs not compiled, programs installed in the wrong place, files (objects, man pages,etc) which are not removed when a "make clean" is done, man pages not formatted, other man pages which are the wrong ones being installed, programs compiling with errors and so on and so forth. In short, most of the Makefiles and a number of sourcefiles in the system were in need of repair. Much of the credit (or blame ;-)) for the series of patches to follow is due to Paul Taylor (taylor@oswego.oswego.edu). Takes a high amount of "patience" to do multiple top level 'make's on a pdp-11/73. Thanks. Repeat-By: cd /usr/src make all make install make clean After anywhere between 12 and 18 hours note the debris and errors left behind. Fix: Apply this final patch (#116) This patch fixes the problems in the /usr/src/usr.lib Makefiles. The MX version of sendmail had a rather serious flaw, it would not deliver a mail item after opening the connection - this has been fixed thanks to Lasse Ylitalo & Johnny Billquist. The 'makewhatis' script was (finally) fixed to handle the man page directory structure (i'm _still not_ convinced having the man page sources separate from the 'catN' directory is a good thing). 'makewhatis' now scans the formatted man pages rather than attempting to look for the raw man pages. Some of the patches may not apply because the programs (notably in /usr/src/new and /usr/src/local) may not be present in the system (having been ported/added since the initial release of the system). There was an earlier posting of these programs ('popper', 'less', etc), if those articles are not present they may be obtained (along with these and previous patches) via anonymous FTP to 'ftp.iipo.gtegsc.com' in the directory pub/2.11BSD. The patches have been grouped and split along directory boundaries. The contents are: #106 - script to remove some redundant man pages and rename others to their correct resting place. /usr/src/Makefile (top level makefile) patch. NOTE: the choice of hostfile or nameserver is made only in lib/libc/Makefile now, not in both /usr/src/Makefile and lib/libc/Makefile #107 - /usr/src/bin updates. There are two source (.c and .h) updates as well as the Makefile patches. #108 - /usr/src/etc updates. Several source patches are included. #109 - /usr/src/games updates. A couple of .c files are also updated to remove compile time warnings. NOTE: before doing a top level make you will have to configure 'warp' and do a 'make depend'. #110 - /usr/src/lib updates. Only Makefiles are updated. #111 - /usr/src/local updates. Only Makefile are updated but some of the directories/programs may not exist on all systems. #112 - /usr/src/man updates. One man page (last.1) is updated along with the Makefiles. #113 - /usr/src/new updates. Some programs may not exist ('tcsh') on all systems (but are available via ftp). Other programs (rn, etc) may require some attention if the patches do not apply cleanly. #114 - /usr/src/ucb updates. The 'last' command is updated to handle alternate wtmp files. A couple other .h or .c files are updated to remove compile time warning errors. #115 - /usr/src/usr.bin updates. The 'struct' and 'tbl' program sources receive numerous updates to remove compile time errors. The remaining updates apply to the Makefiles. #116 - /usr/src/usr.lib updates. Makefiles are fixed. ======================================================================== *** /usr/src/usr.lib/Makefile.old Thu Sep 21 09:28:16 1989 --- /usr/src/usr.lib/Makefile Mon Jan 18 09:37:45 1993 *************** *** 52,58 **** ${STD}: SEPFLAG${SEPFLAG} cc ${CFLAGS} ${SEPFLAG} -o $@ $@.c ! install: -for i in ${SUBDIR}; do \ (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); done -for i in ${SCRIPT}; do (install -c $$i.sh ${DESTDIR}/usr/lib/$$i); done --- 52,58 ---- ${STD}: SEPFLAG${SEPFLAG} cc ${CFLAGS} ${SEPFLAG} -o $@ $@.c ! install: ${STD} ${NSTD} lib.b -for i in ${SUBDIR}; do \ (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); done -for i in ${SCRIPT}; do (install -c $$i.sh ${DESTDIR}/usr/lib/$$i); done *** /usr/src/usr.lib/libU77/test/makefile.old Wed Feb 18 01:09:52 1987 --- /usr/src/usr.lib/libU77/test/makefile Mon Jan 18 09:37:47 1993 *************** *** 5,7 **** --- 5,9 ---- $(TESTS): f77 -O $*.f -o $* + + install: *** /usr/src/usr.lib/libplot/aed/Makefile.old Wed Feb 18 01:10:08 1987 --- /usr/src/usr.lib/libplot/aed/Makefile Mon Jan 18 09:37:48 1993 *************** *** 16,18 **** --- 16,20 ---- clean: rm -f ${OBJS} errs a.out core + + install: *** /usr/src/usr.lib/libplot/bitgraph/Makefile.old Wed Feb 18 01:10:34 1987 --- /usr/src/usr.lib/libplot/bitgraph/Makefile Mon Jan 18 09:37:49 1993 *************** *** 16,18 **** --- 16,20 ---- clean: rm -f ${OBJS} errs a.out core + + install: *** /usr/src/usr.lib/libplot/dumb/Makefile.old Wed Feb 18 01:10:32 1987 --- /usr/src/usr.lib/libplot/dumb/Makefile Mon Jan 18 09:37:50 1993 *************** *** 17,19 **** --- 17,21 ---- clean: rm -f ${OBJS} errs a.out core + + install: *** /usr/src/usr.lib/libplot/gigi/Makefile.old Wed Feb 18 01:10:04 1987 --- /usr/src/usr.lib/libplot/gigi/Makefile Mon Jan 18 09:37:51 1993 *************** *** 17,19 **** --- 17,21 ---- clean: rm -f ${OBJS} errs a.out core + + install: *** /usr/src/usr.lib/libplot/hp2648/Makefile.old Wed Feb 18 01:10:26 1987 --- /usr/src/usr.lib/libplot/hp2648/Makefile Mon Jan 18 09:37:52 1993 *************** *** 17,19 **** --- 17,21 ---- clean: rm -f ${OBJS} errs a.out core + + install: *** /usr/src/usr.lib/libplot/hp7221/Makefile.old Wed Feb 18 01:10:30 1987 --- /usr/src/usr.lib/libplot/hp7221/Makefile Mon Jan 18 09:37:52 1993 *************** *** 17,19 **** --- 17,21 ---- clean: rm -f ${OBJS} errs a.out core + + install: *** /usr/src/usr.lib/libplot/imagen/Makefile.old Wed Feb 18 01:10:36 1987 --- /usr/src/usr.lib/libplot/imagen/Makefile Mon Jan 18 09:37:53 1993 *************** *** 25,27 **** --- 25,29 ---- clean: rm -f ${OBJS} a.out core errs + + install: *** /usr/src/usr.lib/libplot/plot/Makefile.old Wed Feb 18 01:10:06 1987 --- /usr/src/usr.lib/libplot/plot/Makefile Mon Jan 18 09:37:54 1993 *************** *** 9,11 **** --- 9,13 ---- clean: rm -f ${OBJS} errs a.out core + + install: *** /usr/src/usr.lib/libplot/t300/Makefile.old Wed Feb 18 01:10:18 1987 --- /usr/src/usr.lib/libplot/t300/Makefile Mon Jan 18 09:37:55 1993 *************** *** 9,11 **** --- 9,13 ---- clean: rm -f ${OBJS} errs a.out core + + install: *** /usr/src/usr.lib/libplot/t300s/Makefile.old Wed Feb 18 01:10:21 1987 --- /usr/src/usr.lib/libplot/t300s/Makefile Mon Jan 18 09:37:56 1993 *************** *** 9,11 **** --- 9,13 ---- clean: rm -f ${OBJS} errs a.out core + + install: *** /usr/src/usr.lib/libplot/t4013/Makefile.old Wed Feb 18 01:10:10 1987 --- /usr/src/usr.lib/libplot/t4013/Makefile Mon Jan 18 09:37:57 1993 *************** *** 14,16 **** --- 14,18 ---- clean: rm -f ${OBJS} errs a.out core + + install: *** /usr/src/usr.lib/libplot/t4014/Makefile.old Wed Feb 18 01:10:23 1987 --- /usr/src/usr.lib/libplot/t4014/Makefile Mon Jan 18 09:37:57 1993 *************** *** 9,11 **** --- 9,13 ---- clean: rm -f ${OBJS} errs a.out core + + install: *** /usr/src/usr.lib/libplot/t450/Makefile.old Wed Feb 18 01:10:25 1987 --- /usr/src/usr.lib/libplot/t450/Makefile Mon Jan 18 09:37:58 1993 *************** *** 9,11 **** --- 9,13 ---- clean: rm -f ${OBJS} errs a.out core + + install: *** /usr/src/usr.lib/libplot/tf77/Makefile.old Wed Feb 18 01:10:12 1987 --- /usr/src/usr.lib/libplot/tf77/Makefile Mon Jan 18 09:37:59 1993 *************** *** 15,17 **** --- 15,19 ---- clean: rm -f ${OBJS} errs a.out core + + install: *** /usr/src/usr.lib/libplot/vt0/Makefile.old Wed Feb 18 01:10:28 1987 --- /usr/src/usr.lib/libplot/vt0/Makefile Mon Jan 18 09:38:00 1993 *************** *** 9,11 **** --- 9,13 ---- clean: rm -f ${OBJS} errs a.out core + + install: *** /usr/src/usr.lib/libutil/Makefile.old Tue Sep 19 09:45:30 1989 --- /usr/src/usr.lib/libutil/Makefile Mon Jan 18 09:38:01 1993 *************** *** 48,54 **** depend: mkdep ${CFLAGS} ${SRCS} ! install: install -o bin -g bin -m 644 libutil.a ${DESTDIR}/usr/lib ranlib -t ${DESTDIR}/usr/lib/libutil.a install -o bin -g bin -m 644 libutil_p.a ${DESTDIR}/usr/lib --- 48,54 ---- depend: mkdep ${CFLAGS} ${SRCS} ! install: all install -o bin -g bin -m 644 libutil.a ${DESTDIR}/usr/lib ranlib -t ${DESTDIR}/usr/lib/libutil.a install -o bin -g bin -m 644 libutil_p.a ${DESTDIR}/usr/lib *** /usr/src/usr.lib/makewhatis.sh.old Sat Aug 22 21:15:07 1987 --- /usr/src/usr.lib/makewhatis.sh Mon Jan 18 09:37:46 1993 *************** *** 6,41 **** # # @(#)makewhatis.sh 5.3 (Berkeley) 3/29/86 # ! ! trap "rm -f /tmp/whatisx.$$ /tmp/whatis$$; exit 1" 1 2 13 15 MANDIR=${1-/usr/man} ! rm -f /tmp/whatisx.$$ /tmp/whatis$$ if test ! -d $MANDIR ; then exit 0 ; fi cd $MANDIR top=`pwd` ! for i in man1 man2 man3 man4 man5 man6 man7 man8 mann manl do if [ -d $i ] ; then cd $i ! for s in a-m n-z A-Z_ do ! if test "`echo [$s]*.*`" != "[$s]*.*" ; then ! /usr/lib/getNAME [$s]*.* ! fi ! done cd $top fi ! done >/tmp/whatisx.$$ ! sed /tmp/whatis$$ \ ! -e 's/\\-/-/' \ ! -e 's/\\\*-/-/' \ ! -e 's/ VAX-11//' \ ! -e 's/\\f[PRIB0123]//g' \ ! -e 's/\\s[-+0-9]*//g' \ ! -e 's/.TH [^ ]* \([^ ]*\).* \([^-]*\)/\2(\1) /' \ ! -e 's/ / /g' ! /usr/ucb/expand -24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100 \ ! /tmp/whatis$$ | sort | /usr/ucb/unexpand -a > whatis chmod 664 whatis >/dev/null 2>&1 ! rm -f /tmp/whatisx.$$ /tmp/whatis$$ exit 0 --- 6,32 ---- # # @(#)makewhatis.sh 5.3 (Berkeley) 3/29/86 # ! trap "rm -f /tmp/whatis$$; exit 1" 1 2 13 15 MANDIR=${1-/usr/man} ! TMPFILE=/tmp/whatis$$ ! rm -f $TMPFILE ! cp /dev/null $TMPFILE if test ! -d $MANDIR ; then exit 0 ; fi cd $MANDIR top=`pwd` ! for i in cat* do if [ -d $i ] ; then cd $i ! for file in `find . -type f -name '*.0' -print` do ! sed -n -f /usr/man/makewhatis.sed $file ! done >> $TMPFILE cd $top fi ! done ! rm -f $top/whatis ! sort -u $TMPFILE > $top/whatis chmod 664 whatis >/dev/null 2>&1 ! rm -f $TMPFILE exit 0 *** /usr/src/usr.lib/sendmail.MX/aux/Makefile.old Thu Sep 15 02:59:14 1988 --- /usr/src/usr.lib/sendmail.MX/aux/Makefile Mon Jan 18 09:38:12 1993 *************** *** 46,52 **** depend: FRC mkdep ${CFLAGS} ${SRCS} ! install: FRC # install -s -o root -m 4755 mail ${DESTDIR}/bin/mail # install -s -o bin -m 755 rmail ${DESTDIR}/bin/rmail install -s -o bin -m 755 mconnect mailstats praliases \ --- 46,52 ---- depend: FRC mkdep ${CFLAGS} ${SRCS} ! install: ${ALL} # install -s -o root -m 4755 mail ${DESTDIR}/bin/mail # install -s -o bin -m 755 rmail ${DESTDIR}/bin/rmail install -s -o bin -m 755 mconnect mailstats praliases \ *** /usr/src/usr.lib/sendmail.MX/cf.hosttable/Makefile.old Fri Feb 14 19:54:50 1986 --- /usr/src/usr.lib/sendmail.MX/cf.hosttable/Makefile Mon Jan 18 09:38:43 1993 *************** *** 115,117 **** --- 115,121 ---- clean: rm -f $(ALL) a.out core make.out rm -f ,* + + install: + + install: *** /usr/src/usr.lib/sendmail.MX/doc/Makefile.old Wed Sep 14 04:47:11 1988 --- /usr/src/usr.lib/sendmail.MX/doc/Makefile Mon Jan 18 09:38:56 1993 *************** *** 42,44 **** --- 42,46 ---- clean: rm -f $(OBJS) a.out core + + install: *** /usr/src/usr.lib/sendmail.MX/lib/Makefile.old Thu Sep 15 00:32:07 1988 --- /usr/src/usr.lib/sendmail.MX/lib/Makefile Mon Jan 18 09:38:57 1993 *************** *** 18,24 **** clean: FRC depend: FRC ! install: FRC install -c -o bin -m 444 sendmail.hf ${DESTDIR}/usr/lib/sendmail.hf FRC: --- 18,24 ---- clean: FRC depend: FRC ! install: sendmail.hf install -c -o bin -m 444 sendmail.hf ${DESTDIR}/usr/lib/sendmail.hf FRC: *** /usr/src/usr.lib/sendmail.MX/src/Makefile.old Sat Oct 22 22:55:58 1988 --- /usr/src/usr.lib/sendmail.MX/src/Makefile Mon Jan 18 09:38:58 1993 *************** *** 58,64 **** ${CC} ${COPTS} -o sendmail Version.o ${OBJS} -ldbm -lresolv size sendmail; ls -l sendmail; ${WHAT} < Version.o ! install: install -c -s -o root -g kmem -m 6755 sendmail ${DESTDIR}/usr/lib install -c -o bin -m 644 /dev/null ${DESTDIR}/usr/lib/sendmail.fc install -c -o bin -m 666 /dev/null ${DESTDIR}/usr/lib/sendmail.st --- 58,64 ---- ${CC} ${COPTS} -o sendmail Version.o ${OBJS} -ldbm -lresolv size sendmail; ls -l sendmail; ${WHAT} < Version.o ! install: sendmail install -c -s -o root -g kmem -m 6755 sendmail ${DESTDIR}/usr/lib install -c -o bin -m 644 /dev/null ${DESTDIR}/usr/lib/sendmail.fc install -c -o bin -m 666 /dev/null ${DESTDIR}/usr/lib/sendmail.st *** /usr/src/usr.lib/sendmail.MX/src/deliver.c.old Sat Sep 17 14:22:05 1988 --- /usr/src/usr.lib/sendmail.MX/src/deliver.c Sun Jan 31 15:01:22 1993 *************** *** 12,17 **** --- 12,22 ---- * Sendmail * Copyright (c) 1983 Eric P. Allman * Berkeley, California + * + * Bugfix: + * 1993 Jan 30 Lasse Ylitalo && Johnny Billquist + * When delivering mail via smtp the mail went into + * the bit bucket. Only smtpinit was called... */ #if !defined(lint) && !defined(NOSCCS) *************** *** 408,414 **** --- 413,459 ---- /* send the initial SMTP protocol */ if (rcode == EX_OK) + { rcode = smtpinit(m, pv); + + /* Added some delivering of mail via + * SMTP... LY&&JB 93Jan30 + */ + if (rcode == EX_OK) + { + /* send the recipient list */ + tobuf[0] = '\0'; + for (to = tochain; to != NULL; to = to->q_tchain) + { + int i; + + e->e_to = to->q_paddr; + i = smtprcpt(to, m); + if (i != EX_OK) + { + markfailure(e, to, i); + giveresponse(i, m, e); + } + else + { + (void) strcat(tobuf, ","); + (void) strcat(tobuf, to->q_paddr); + } + } + + /* now send the data */ + if (tobuf[0] == '\0') + e->e_to = NULL; + else + { + e->e_to = tobuf + 1; + rcode = smtpdata(m, e); + } + + /* now close the connection */ + smtpquit(m); + } + } } else #endif /* SMTP */ *** /usr/src/usr.lib/sendmail/cf.hosttable/Makefile.old Wed Feb 18 01:11:17 1987 --- /usr/src/usr.lib/sendmail/cf.hosttable/Makefile Mon Jan 18 09:38:03 1993 *************** *** 115,117 **** --- 115,121 ---- clean: rm -f $(ALL) a.out core make.out rm -f ,* + + install: + + install: *** /usr/src/usr.lib/sendmail/cf.named/Makefile.old Wed Feb 18 01:11:24 1987 --- /usr/src/usr.lib/sendmail/cf.named/Makefile Mon Jan 18 09:38:04 1993 *************** *** 62,64 **** --- 62,66 ---- kim.cf: uucpm.m4 ucbvax.cf: uucphosts.m4 rule5.m4 berkm.m4 suucpm.m4 uucpm.m4 + + install: *** /usr/src/usr.lib/sendmail/doc/Makefile.old Wed Feb 18 01:10:55 1987 --- /usr/src/usr.lib/sendmail/doc/Makefile Fri Jan 22 23:16:47 1993 *************** *** 15,21 **** OBJS= intro.lpr op.lpr usenix.lpr DOCS= intro.me op.me usenix.me ! SRCS= $(DOCS) sendmail.8 syslog.3 syslog.8 ALL= $(OBJS) rfc819.lpr rfc821.lpr rfc822.lpr LPR= lpr --- 15,21 ---- OBJS= intro.lpr op.lpr usenix.lpr DOCS= intro.me op.me usenix.me ! SRCS= $(DOCS) ALL= $(OBJS) rfc819.lpr rfc821.lpr rfc822.lpr LPR= lpr *************** *** 42,44 **** --- 42,46 ---- clean: rm -f $(OBJS) a.out core + + install: *** /usr/src/usr.lib/sendmail/lib/Makefile.old Wed Feb 18 01:11:08 1987 --- /usr/src/usr.lib/sendmail/lib/Makefile Mon Jan 18 09:38:07 1993 *************** *** 25,27 **** --- 25,29 ---- $(SRCS): $(GET) $(REL) SCCS/s.$@ + + install: