Subject: Top level make problems (and others) + fixes (3 of 11 - #108)
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 (#108) and the following patches (109,110,111,
	112,113,114,115, and 116).   'catman' has been modified to
	continue on rather than exit if a manpage directory does not
	exist.  'mkproto' needed a change because of the kernel
	configuration changes made recently (EXTERNALITIMES is not
	hidden under a "#ifdef KERNEL" now).

	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/etc/Makefile.old	Thu May 17 20:42:51 1990
--- /usr/src/etc/Makefile	Mon Jan 18 08:46:31 1993
***************
*** 56,62 ****
  ${STD} ${KMEM} ${SETUID} ${OPERATOR}:
  	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}/etc/$$i); done
--- 56,62 ----
  ${STD} ${KMEM} ${SETUID} ${OPERATOR}:
  	cc ${CFLAGS} ${SEPFLAG} -o $@ $@.c
  
! install: ${STD} ${NSTD} ${SETUID} ${KMEM}  ${OPERATOR}
  	-for i in ${SUBDIR}; do \
  		(cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); done
  	-for i in ${SCRIPT}; do (install -c $$i.sh ${DESTDIR}/etc/$$i); done
*** /usr/src/etc/catman.c.old	Thu Jul 23 06:34:37 1987
--- /usr/src/etc/catman.c	Mon Jan 18 08:46:33 1993
***************
*** 101,107 ****
  	char *mandir;
  {
  	register char *msp, *csp, *sp;
! 	int changed = 0;
  	int status;
  
  	if (wflag)
--- 101,107 ----
  	char *mandir;
  {
  	register char *msp, *csp, *sp;
! 	int changed = 1;
  	int status;
  
  	if (wflag)
***************
*** 125,132 ****
  		man[3] = cat[3] = *sp;
  		*msp = *csp = '\0';
  		if ((mdir = opendir(man)) == NULL) {
! 			sprintf(buf, "catman: opendir: %s", man);
! 			perror(buf);
  			/* exstat = 1; */
  			continue;
  		}
--- 125,132 ----
  		man[3] = cat[3] = *sp;
  		*msp = *csp = '\0';
  		if ((mdir = opendir(man)) == NULL) {
! 			/* sprintf(buf, "catman: opendir: %s", man); */
! 			/* perror(buf); */
  			/* exstat = 1; */
  			continue;
  		}
*** /usr/src/etc/chroot/Makefile.old	Thu May 10 15:18:45 1990
--- /usr/src/etc/chroot/Makefile	Mon Jan 25 23:29:11 1993
***************
*** 18,45 ****
  #
  
  CFLAGS=	-O
  LIBC=	/lib/libc.a
  SRCS=	chroot.c
  OBJS=
  MAN=	chroot.0
  
  all: chroot
  
  chroot: ${LIBC}
! 	${CC} -o $@ ${CFLAGS} $@.c
  
  clean:
! 	rm -f ${OBJS} core chroot
  
  cleandir: clean
! 	rm -f ${MAN} tags .depend
  
  depend: ${SRCS}
  	mkdep -p ${CFLAGS} ${SRCS}
  
! install: ${MAN}
  	install -s -o root -g bin -m 4751 chroot ${DESTDIR}/etc
! 	-install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat8
  
  lint: ${SRCS}
  	lint ${CFLAGS} ${SRCS}
--- 18,50 ----
  #
  
  CFLAGS=	-O
+ SEPFLAG= -i
  LIBC=	/lib/libc.a
  SRCS=	chroot.c
  OBJS=
  MAN=	chroot.0
+ MANSRC=	chroot.8
  
  all: chroot
  
  chroot: ${LIBC}
! 	${CC} -o ${SEPFLAG} $@ ${CFLAGS} $@.c
  
+ chroot.0: ${MANSRC}
+ 	/usr/man/manroff ${MANSRC} > ${MAN}
+ 
  clean:
! 	rm -f ${OBJS} ${MAN} core chroot
  
  cleandir: clean
! 	rm -f tags .depend
  
  depend: ${SRCS}
  	mkdep -p ${CFLAGS} ${SRCS}
  
! install: ${MAN} chroot
  	install -s -o root -g bin -m 4751 chroot ${DESTDIR}/etc
! 	install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat8
  
  lint: ${SRCS}
  	lint ${CFLAGS} ${SRCS}
*** /usr/src/etc/config/Makefile.old	Tue Feb 17 18:04:34 1987
--- /usr/src/etc/config/Makefile	Mon Jan 18 08:46:35 1993
***************
*** 19,25 ****
  clean:
  	rm -f ${OBJS} lex.yy.c y.tab.c y.tab.h config
  
! install:
  	install -s config ${DESTDIR}/etc/config
  
  lint: ${CFILES}
--- 19,25 ----
  clean:
  	rm -f ${OBJS} lex.yy.c y.tab.c y.tab.h config
  
! install: config
  	install -s config ${DESTDIR}/etc/config
  
  lint: ${CFILES}
*** /usr/src/etc/dump/Makefile.old	Sat Apr 28 20:33:17 1990
--- /usr/src/etc/dump/Makefile	Mon Jan 18 08:46:36 1993
***************
*** 28,34 ****
  dumpdir: dumpdir.c
  	cc ${CFLAGS} ${SEPFLAG} dumpdir.c -o dumpdir
  
! install:
  	install -s dump ${DESTDIR}/etc/dump
  	install -s dumpdir ${DESTDIR}/etc/dumpdir
  
--- 28,34 ----
  dumpdir: dumpdir.c
  	cc ${CFLAGS} ${SEPFLAG} dumpdir.c -o dumpdir
  
! install: all
  	install -s dump ${DESTDIR}/etc/dump
  	install -s dumpdir ${DESTDIR}/etc/dumpdir
  
*** /usr/src/etc/fingerd/Makefile.old	Thu May 10 15:19:14 1990
--- /usr/src/etc/fingerd/Makefile	Mon Jan 25 23:30:29 1993
***************
*** 17,45 ****
  # @(#)Makefile	5.2 (Berkeley) 5/11/89
  #
  
! CFLAGS=	-O ${SEPFLAG}
  LIBC=	/lib/libc.a
  SRCS=	fingerd.c
  OBJS=
  MAN=	fingerd.0
  
  all: fingerd
  
  fingerd: ${LIBC}
! 	${CC} -o $@ ${CFLAGS} $@.c
  
  clean:
! 	rm -f ${OBJS} core fingerd
  
  cleandir: clean
! 	rm -f ${MAN} tags .depend
  
  depend: ${SRCS}
  	mkdep -p ${CFLAGS} ${SRCS}
  
! install: ${MAN}
  	install -s -o bin -g bin -m 755 fingerd ${DESTDIR}/etc/fingerd
! 	-install -c -o bin -g bin -m 444 fingerd.0 ${DESTDIR}/usr/man/cat8
  
  lint: ${SRCS}
  	lint ${CFLAGS} ${SRCS}
--- 17,50 ----
  # @(#)Makefile	5.2 (Berkeley) 5/11/89
  #
  
! CFLAGS=	-O
! SEPFLAG= -i
  LIBC=	/lib/libc.a
  SRCS=	fingerd.c
  OBJS=
  MAN=	fingerd.0
+ MANSRC=	fingerd.8
  
  all: fingerd
  
  fingerd: ${LIBC}
! 	${CC} ${SEPFLAG} -o $@ ${CFLAGS} $@.c
  
+ fingerd.0: ${MANSRC}
+ 	/usr/man/manroff ${MANSRC} > ${MAN}
+ 
  clean:
! 	rm -f ${OBJS} ${MAN} core fingerd
  
  cleandir: clean
! 	rm -f tags .depend
  
  depend: ${SRCS}
  	mkdep -p ${CFLAGS} ${SRCS}
  
! install: ${MAN} fingerd
  	install -s -o bin -g bin -m 755 fingerd ${DESTDIR}/etc/fingerd
! 	install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat8
  
  lint: ${SRCS}
  	lint ${CFLAGS} ${SRCS}
*** /usr/src/etc/ftpd/Makefile.old	Thu May 10 15:19:31 1990
--- /usr/src/etc/ftpd/Makefile	Mon Jan 25 21:26:30 1993
***************
*** 22,27 ****
--- 22,28 ----
  SRCS=	ftpd.c ftpcmd.c glob.c logwtmp.c popen.c vers.c
  OBJS=	ftpd.o ftpcmd.o glob.o logwtmp.o popen.o vers.o
  MAN=	ftpd.0
+ MANSRC=	ftpd.8
  
  all: ftpd
  
***************
*** 33,49 ****
  	${CC} ${CFLAGS} -c vers.c
  
  clean:
! 	rm -f ${OBJS} ftpd core ftpcmd.c
  
  cleandir: clean
! 	rm -f ${MAN} tags .depend
  
  depend: ${SRCS}
  	mkdep ${CFLAGS} ${SRCS}
  
! install: ${MAN}
  	install -s -o bin -g bin -m 751 ftpd ${DESTDIR}/etc
! 	-install -c -o bin -g bin -m 444 ftpd.0 ${DESTDIR}/usr/man/cat8/ftpd.0
  
  lint: ${SRCS}
  	lint ${CFLAGS} ${SRCS}
--- 34,53 ----
  	${CC} ${CFLAGS} -c vers.c
  
  clean:
! 	rm -f ${OBJS} ${MAN} ${GUSMAN} ftpd core ftpcmd.c
  
  cleandir: clean
! 	rm -f tags .depend
  
  depend: ${SRCS}
  	mkdep ${CFLAGS} ${SRCS}
  
! install: ${MAN} ${GUSMAN} ftpd
  	install -s -o bin -g bin -m 751 ftpd ${DESTDIR}/etc
! 	install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat8
! 
! ftpd.0: ${MANSRC}
! 	/usr/man/manroff ${MANSRC} > ${MAN}
  
  lint: ${SRCS}
  	lint ${CFLAGS} ${SRCS}
*** /usr/src/etc/ftpd/ftpd.c.old	Tue May  9 15:09:01 1989
--- /usr/src/etc/ftpd/ftpd.c	Mon Jan 18 08:46:41 1993
***************
*** 774,780 ****
  
  	case TYPE_I:
  	case TYPE_L:
! 		if ((buf = malloc((u_int)blksize)) == NULL) {
  			transflag = 0;
  			perror_reply(451, "Local resource failure: malloc");
  			return;
--- 774,780 ----
  
  	case TYPE_I:
  	case TYPE_L:
! 		if ((buf = (char *) malloc((u_int)blksize)) == NULL) {
  			transflag = 0;
  			perror_reply(451, "Local resource failure: malloc");
  			return;
*** /usr/src/etc/getty/gettytab.old	Tue Feb 17 00:54:28 1987
--- /usr/src/etc/getty/gettytab	Fri Jan 22 12:43:59 1993
***************
*** 16,22 ****
  # entries, and in cases where getty is called with no table name
  #
  default:\
! 	:ap:fd#1000:im=\r\n\r\n2.10 BSD UNIX (%h) (%t)\r\n\r\r\n\r:sp#1200:
  
  #
  # Fixed speed entries
--- 16,22 ----
  # entries, and in cases where getty is called with no table name
  #
  default:\
! 	:ap:fd#1000:im=\r\n\r\n2.11 BSD UNIX (%h) (%t)\r\n\r\r\n\r:sp#1200:
  
  #
  # Fixed speed entries
*** /usr/src/etc/htable/Makefile.old	Sun Feb 15 21:57:28 1987
--- /usr/src/etc/htable/Makefile	Mon Jan 18 08:46:42 1993
***************
*** 33,37 ****
  clean:
  	rm -f ${ALL} *.o *.s parse.c scan.c y.tab.h errs
  
! install:
  	install -s htable ${DESTDIR}/etc/htable
--- 33,37 ----
  clean:
  	rm -f ${ALL} *.o *.s parse.c scan.c y.tab.h errs
  
! install: htable
  	install -s htable ${DESTDIR}/etc/htable
*** /usr/src/etc/mkpasswd/Makefile.old	Thu May 10 15:21:07 1990
--- /usr/src/etc/mkpasswd/Makefile	Mon Jan 18 08:46:43 1993
***************
*** 23,28 ****
--- 23,29 ----
  SRCS=	mkpasswd.c
  OBJS=
  MAN=	mkpasswd.0
+ MANSRC=	mkpasswd.8
  
  all: mkpasswd
  
***************
*** 30,46 ****
  	${CC} ${SEPFLAG} -o $@ ${CFLAGS} $@.c
  
  clean:
! 	rm -f ${OBJS} core mkpasswd
  
  cleandir: clean
! 	rm -f ${MAN} tags .depend
  
  depend: ${SRCS}
  	mkdep -p ${CFLAGS} ${SRCS}
  
! install: ${MAN}
  	install -s -o bin -g bin -m 755 mkpasswd ${DESTDIR}/etc
! 	-install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat8
  
  lint: ${SRCS}
  	lint ${CFLAGS} ${SRCS}
--- 31,50 ----
  	${CC} ${SEPFLAG} -o $@ ${CFLAGS} $@.c
  
  clean:
! 	rm -f ${OBJS} ${MAN} core mkpasswd
  
  cleandir: clean
! 	rm -f tags .depend
  
  depend: ${SRCS}
  	mkdep -p ${CFLAGS} ${SRCS}
  
! install: ${MAN} mkpasswd
  	install -s -o bin -g bin -m 755 mkpasswd ${DESTDIR}/etc
! 	install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat8
! 
! mkpasswd.0: ${MANSRC}
! 	/usr/man/manroff ${MANSRC} > ${MAN}
  
  lint: ${SRCS}
  	lint ${CFLAGS} ${SRCS}
*** /usr/src/etc/mkproto.c.old	Tue May 15 09:06:12 1990
--- /usr/src/etc/mkproto.c	Tue Jan 19 20:35:56 1993
***************
*** 20,25 ****
--- 20,26 ----
   */
  #include <stdio.h>
  #include <sys/param.h>
+ #undef	EXTERNALITIMES		/* Need full inode definiton */
  #include <sys/inode.h>
  #include <sys/fs.h>
  #include <sys/dir.h>
*** /usr/src/etc/named/Makefile.old	Fri Oct 14 19:24:22 1988
--- /usr/src/etc/named/Makefile	Tue Jan 19 22:23:11 1993
***************
*** 13,20 ****
  #
  SUBDIR=	tools named
  
! all: named
  
  named: FRC
  	(cd named; make ${MFLAGS} named);
  
--- 13,23 ----
  #
  SUBDIR=	tools named
  
! all: named tools
  
+ tools: FRC
+ 	(cd tools; make ${MFLAGS} );
+ 
  named: FRC
  	(cd named; make ${MFLAGS} named);
  
***************
*** 23,29 ****
  		(cd $$i; make ${MFLAGS} clean); \
  	done
  
! install: FRC
! 	install -s -o bin -m 755 named/named ${DESTDIR}/etc/named
  
  FRC:
--- 26,33 ----
  		(cd $$i; make ${MFLAGS} clean); \
  	done
  
! install: all
! 	(cd named; make ${MFLAGS} install);
! 	(cd tools; make ${MFLAGS} install);
  
  FRC:
*** /usr/src/etc/named/named/Makefile.old	Fri Oct 14 20:20:43 1988
--- /usr/src/etc/named/named/Makefile	Tue Jan 19 22:24:05 1993
***************
*** 29,35 ****
  OBJS1=	db_dump.o ns_init.o
  OBJS2=	db_load.o ns_stats.o
  OBJS=	${BASE} ${OBJS1} ${OBJS2} ${ALLOC}
- SUBDIR=	tools
  
  all: named
  
--- 29,34 ----
***************
*** 41,54 ****
  
  clean: FRC
  	rm -f ${OBJS} core named version.o version.c
- 	for i in ${SUBDIR}; do \
- 		(cd $$i; make ${MFLAGS} clean); \
- 	done
  
  depend: FRC
  	mkdep ${CFLAGS} ${SRCS}
  
! install: FRC
  	install -s -o root -g staff  -m 751 named ${DESTDIR}/etc/named
  
  lint: FRC
--- 40,50 ----
  
  clean: FRC
  	rm -f ${OBJS} core named version.o version.c
  
  depend: FRC
  	mkdep ${CFLAGS} ${SRCS}
  
! install: named
  	install -s -o root -g staff  -m 751 named ${DESTDIR}/etc/named
  
  lint: FRC
*** /usr/src/etc/named/tools/Makefile.old	Sat Sep  3 23:52:14 1988
--- /usr/src/etc/named/tools/Makefile	Mon Jan 18 08:46:47 1993
***************
*** 18,24 ****
  SRCS=	nsquery.c nstest.c
  OBJS=	nsquery.o nstest.o
  
! all: nsquery nstest
  
  nsquery: ${LIBC}
  	${CC} ${CFLAGS} ${SEPFLAG} -o $@ nsquery.c ${RES}
--- 18,24 ----
  SRCS=	nsquery.c nstest.c
  OBJS=	nsquery.o nstest.o
  
! all: nsquery nstest nslookup
  
  nsquery: ${LIBC}
  	${CC} ${CFLAGS} ${SEPFLAG} -o $@ nsquery.c ${RES}
***************
*** 29,41 ****
  	@echo "option or nstest will not have any output."
  	${CC} ${CFLAGS} ${SEPFLAG} -o $@ nstest.c ${RES}
  
  clean: FRC
  	rm -f ${OBJS} core nsquery nstest
  
  depend: FRC
  	mkdep -p ${CFLAGS} ${SRCS}
  
! install: FRC
  
  lint: FRC
  	lint ${CFLAGS} ${SRCS}
--- 29,48 ----
  	@echo "option or nstest will not have any output."
  	${CC} ${CFLAGS} ${SEPFLAG} -o $@ nstest.c ${RES}
  
+ nslookup: FRC
+ 	(cd nslookup; make ${MFLAGS});
+ 
  clean: FRC
  	rm -f ${OBJS} core nsquery nstest
+ 	(cd nslookup; make ${MFLAGS} clean);
  
  depend: FRC
  	mkdep -p ${CFLAGS} ${SRCS}
  
! install: nstest nsquery
! 	install -s -o root -g sys -m 755 nsquery /usr/bin/nsquery
! 	install -s -o root -g sys -m 755 nstest /usr/bin/nstest
! 	(cd nslookup; make ${MFLAGS} install);
  
  lint: FRC
  	lint ${CFLAGS} ${SRCS}
*** /usr/src/etc/named/tools/nslookup/Makefile.old	Thu Sep  8 00:11:38 1988
--- /usr/src/etc/named/tools/nslookup/Makefile	Mon Jan 18 08:46:48 1993
***************
*** 29,36 ****
  depend: ${SRCS} FRC
  	mkdep ${CFLAGS} ${SRCS}
  
! install: FRC
! 	install -s -o bin -m 755 nslookup ${DESTDIR}/etc/nslookup
  	install -c -o bin -m 444 nslookup.help ${DESTDIR}/usr/lib/nslookup.help
  
  lint: ${SRCS} FRC
--- 29,36 ----
  depend: ${SRCS} FRC
  	mkdep ${CFLAGS} ${SRCS}
  
! install: nslookup
! 	install -s -o bin -m 755 nslookup ${DESTDIR}/usr/bin/nslookup
  	install -c -o bin -m 444 nslookup.help ${DESTDIR}/usr/lib/nslookup.help
  
  lint: ${SRCS} FRC
*** /usr/src/etc/restor/Makefile.old	Fri Apr 27 21:04:20 1990
--- /usr/src/etc/restor/Makefile	Mon Jan 18 08:46:49 1993
***************
*** 17,23 ****
  restor: ${OBJS}
  	${CC} ${SEPFLAG} ${OBJS} -o restor
  
! install:
  	install -s restor ${DESTDIR}/etc
  
  clean:
--- 17,23 ----
  restor: ${OBJS}
  	${CC} ${SEPFLAG} ${OBJS} -o restor
  
! install: restor
  	install -s restor ${DESTDIR}/etc
  
  clean:
*** /usr/src/etc/rlogind/Makefile.old	Thu May 10 15:21:26 1990
--- /usr/src/etc/rlogind/Makefile	Mon Jan 18 08:46:50 1993
***************
*** 22,27 ****
--- 22,28 ----
  SRCS=	rlogind.c
  OBJS=
  MAN=	rlogind.0
+ MANSRC=	rlogind.8
  
  all: rlogind
  
***************
*** 29,48 ****
  	${CC} -o $@ ${CFLAGS} ${SRCS} -lutil
  
  clean:
! 	rm -f ${OBJS} core rlogind
  
  cleandir: clean
! 	rm -f ${MAN} tags .depend
  
  depend: ${SRCS}
  	mkdep -p ${CFLAGS} ${SRCS}
  
! install: ${MAN}
  	install -s -o bin -g bin -m 755 rlogind ${DESTDIR}/etc
! 	-install -c -o bin -g bin -m 444 rlogind.0 ${DESTDIR}/usr/man/cat8
  
! rlogind.0:
! 	nroff -man rlogind.8 >rlogind.0
  
  lint: ${SRCS}
  	lint ${CFLAGS} ${SRCS}
--- 30,49 ----
  	${CC} -o $@ ${CFLAGS} ${SRCS} -lutil
  
  clean:
! 	rm -f ${OBJS} ${MAN} core rlogind
  
  cleandir: clean
! 	rm -f tags .depend
  
  depend: ${SRCS}
  	mkdep -p ${CFLAGS} ${SRCS}
  
! install: ${MAN} rlogind
  	install -s -o bin -g bin -m 755 rlogind ${DESTDIR}/etc
! 	install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat8
  
! rlogind.0: ${MANSRC}
! 	/usr/man/manroff ${MANSRC} > ${MAN}
  
  lint: ${SRCS}
  	lint ${CFLAGS} ${SRCS}
*** /usr/src/etc/routed/af.c.old	Tue Aug 30 23:33:47 1988
--- /usr/src/etc/routed/af.c	Mon Jan 18 08:46:51 1993
***************
*** 115,120 ****
--- 115,124 ----
  	u_long n = ntohl(sin->sin_addr.s_addr);
  	int i;
  
+ #ifdef IN_BADCLASS
+ #undef IN_BADCLASS
+ #endif IN_BADCLASS
+ 
  #define	IN_BADCLASS(n)	(((long) (n) & 0xe0000000) == 0xe0000000)
  
  	if (IN_BADCLASS(n) || sin->sin_port != 0)
*** /usr/src/etc/rshd/Makefile.old	Thu May 10 15:21:45 1990
--- /usr/src/etc/rshd/Makefile	Mon Jan 18 08:46:52 1993
***************
*** 22,27 ****
--- 22,28 ----
  SRCS=	rshd.c
  OBJS=
  MAN=	rshd.0
+ MANSRC=	rshd.8
  
  all: rshd
  
***************
*** 29,48 ****
  	${CC} -o $@ ${CFLAGS} $@.c
  
  clean:
! 	rm -f ${OBJS} core rshd
  
  cleandir: clean
! 	rm -f ${MAN} tags .depend
  
  depend: ${SRCS}
  	mkdep -p ${CFLAGS} ${SRCS}
  
! install: ${MAN}
  	install -s -o bin -g bin -m 755 rshd ${DESTDIR}/etc
! 	-install -c -o bin -g bin -m 444 rshd.0 ${DESTDIR}/usr/man/cat8
  
! rshd.0:
! 	nroff -man rshd.8 >rshd.0
  
  lint: ${SRCS}
  	lint ${CFLAGS} ${SRCS}
--- 30,49 ----
  	${CC} -o $@ ${CFLAGS} $@.c
  
  clean:
! 	rm -f ${OBJS} ${MAN} core rshd
  
  cleandir: clean
! 	rm -f tags .depend
  
  depend: ${SRCS}
  	mkdep -p ${CFLAGS} ${SRCS}
  
! install: ${MAN} rshd
  	install -s -o bin -g bin -m 755 rshd ${DESTDIR}/etc
! 	install -c -o bin -g bin -m 444 rshd.0 ${DESTDIR}/usr/man/cat8
  
! rshd.0: ${MANSRC}
! 	/usr/man/manroff ${MANSRC} > ${MAN}
  
  lint: ${SRCS}
  	lint ${CFLAGS} ${SRCS}
*** /usr/src/etc/termcap/Makefile.old	Sun Feb 15 20:50:37 1987
--- /usr/src/etc/termcap/Makefile	Wed Jan 20 13:59:17 1993
***************
*** 26,42 ****
  	rm -f termcap
  
  FRC:
- 
- installall:
- 	cp termcap /etc/termcap
- 	@for i in arpa ernie kim dali calder ucbvax miro;\
- 		do echo $$i;\
- 		rcp termcap $$i':'/etc/termcap;\
- 		done
- 
- tabsetall: tabset
- 	@for i in arpa ernie kim dali calder ucbvax miro;\
- 		do echo $$i;\
- 		rsh $$i /bin/rm -fr /usr/lib/tabset;\
- 		rcp -r tabset $$i':'/usr/lib;\
- 		done
--- 26,28 ----
*** /usr/src/etc/tftpd/Makefile.old	Sun Jul  3 17:42:25 1988
--- /usr/src/etc/tftpd/Makefile	Wed Jan 20 08:37:26 1993
***************
*** 6,12 ****
  #	@(#)Makefile	1.2 (Berkeley) 2/7/86
  #
  
! ALL=	tftpd.o tftpsubs.o
  DESTDIR=
  CFLAGS=	-O
  SEPFLAG= -i
--- 6,14 ----
  #	@(#)Makefile	1.2 (Berkeley) 2/7/86
  #
  
! OBJ=	tftpd.o tftpsubs.o
! MAN=	tftpd.0
! ALL=	${OBJ} ${MAN}
  DESTDIR=
  CFLAGS=	-O
  SEPFLAG= -i
***************
*** 13,22 ****
  LDFLAGS=
  
  tftpd:	${ALL}
! 	${CC} ${LDFLAGS} ${SEPFLAG} -o tftpd ${ALL}
  
! install:
  	install -s tftpd ${DESTDIR}/etc/tftpd
  
  clean:
! 	rm -f tftpd *.o *.s errs core a.out t.?
--- 15,28 ----
  LDFLAGS=
  
  tftpd:	${ALL}
! 	${CC} ${LDFLAGS} ${SEPFLAG} -o tftpd ${OBJ}
  
! tftpd.0:	tftpd.8
! 	/usr/man/manroff tftpd.8 > tftpd.0
! 
! install: tftpd tftpd.0
  	install -s tftpd ${DESTDIR}/etc/tftpd
+ 	install -c -m 444 tftpd.0 ${DESTDIR}/usr/man/cat8/tftpd.0
  
  clean:
! 	rm -f tftpd *.o *.s errs core a.out t.? tftpd.0
*** /usr/src/etc/tzone/Makefile.old	Sat Dec 24 22:52:06 1988
--- /usr/src/etc/tzone/Makefile	Mon Jan 18 08:46:55 1993
***************
*** 43,54 ****
  DATA=		asia australasia europe etcetera northamerica \
  		pacificnew systemv
  ENCHILADA=	$(DOCS) $(SOURCES) $(DATA)
  
  all:		zdump zic
  
! install:	zic $(DATA)
  		./zic -d ${DESTDIR}/etc/zoneinfo -l $(LOCALTIME) $(DATA)
  
  zdump:		$(TZDOBJS)
  		$(CC) $(CFLAGS) $(LFLAGS) $(SEPFLAG) $(TZDOBJS) -o $@
  
--- 43,68 ----
  DATA=		asia australasia europe etcetera northamerica \
  		pacificnew systemv
  ENCHILADA=	$(DOCS) $(SOURCES) $(DATA)
+ ZICMAN=		zic.0
+ ZICMANSRC=	zic.8
+ ZDUMAN=		zdump.0
+ ZDUMANSRC=	zdump.8
+ MAN=		$(ZICMAN) $(ZDUMAN)
+ MANSRC=		$(ZICMANSRC) $(ZDUMAN)
  
  all:		zdump zic
  
! install:	zic $(DATA) $(MAN)
  		./zic -d ${DESTDIR}/etc/zoneinfo -l $(LOCALTIME) $(DATA)
+ 		install -c -m 444 -o bin -g bin $(ZICMAN) ${DESTDIR}/usr/man/cat8
+ 		install -c -m 444 -o bin -g bin $(ZICMAN) ${DESTDIR}/usr/man/cat8
  
+ zdump.0:	$(ZDUMANSRC)
+ 		/usr/man/manroff $(ZDUMANSRC) > $(ZDUMAN)
+ 
+ zic.0:		$(ZICMANSRC)
+ 		/usr/man/manroff $(ZICMANSRC) > $(ZICMAN)
+ 
  zdump:		$(TZDOBJS)
  		$(CC) $(CFLAGS) $(LFLAGS) $(SEPFLAG) $(TZDOBJS) -o $@
  
***************
*** 75,80 ****
--- 89,95 ----
  
  clean:
  		rm -f core *.o *.out REDID_BINARIES zdump zic BUNDLE* \#*
+ 		rm -f $(ZICMAN) $(ZDUMAN)
  
  CLEAN:		clean
  		sccs clean
*** /usr/src/etc/vipw/Makefile.old	Thu May 10 15:22:30 1990
--- /usr/src/etc/vipw/Makefile	Mon Jan 18 08:46:56 1993
***************
*** 23,28 ****
--- 23,29 ----
  SRCS=	vipw.c
  OBJS=
  MAN=	vipw.0
+ MANSRC=	vipw.8
  
  all: vipw
  
***************
*** 29,46 ****
  vipw: ${LIBC}
  	${CC} ${SEPFLAG} -o $@ ${CFLAGS} $@.c
  
  clean:
! 	rm -f ${OBJS} core vipw
  
  cleandir: clean
! 	rm -f ${MAN} tags .depend
  
  depend: ${SRCS}
  	mkdep -p ${CFLAGS} ${SRCS}
  
! install: ${MAN}
  	install -s -o bin -g bin -m 755 vipw ${DESTDIR}/etc
! 	-install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat8
  
  lint: ${SRCS}
  	lint ${CFLAGS} ${SRCS}
--- 30,50 ----
  vipw: ${LIBC}
  	${CC} ${SEPFLAG} -o $@ ${CFLAGS} $@.c
  
+ vipw.0: ${MANSRC}
+ 	/usr/man/manroff ${MANSRC} > ${MAN}
+ 
  clean:
! 	rm -f ${OBJS} ${MAN} core vipw
  
  cleandir: clean
! 	rm -f tags .depend
  
  depend: ${SRCS}
  	mkdep -p ${CFLAGS} ${SRCS}
  
! install: ${MAN} vipw
  	install -s -o bin -g bin -m 755 vipw ${DESTDIR}/etc
! 	install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat8
  
  lint: ${SRCS}
  	lint ${CFLAGS} ${SRCS}
