# makefile of System V man program
#
# AUTHOR
#	Edward C. Bennett, edward@ukecc.UUCP
#
# Copyright 1985 by Edward C. Bennett
#
# Permission is given to alter this code as needed to adapt it to forign
# systems provided that this header is included and that the original
# author's name is preserved.

USRBIN=/usr/bin
MANOWN=bin

man: man.c
	cc -O man.c -o man

xref: mkxref
	mkxref > /usr/man/xref

mkxref: mkxref.c
	cc -O mkxref.c -o mkxref

updateall: updateall.c
	cc -O updateall.c -o updateall

install: man
	/etc/install -f ${USRBIN} man
	chown ${MANOWN} ${USRBIN}/man
	chmod 4755 ${USRBIN}/man

convert: man mkxref
	mv ${USRBIN}/man ${USRBIN}/oman
	mv /usr/man/u_man/man1/man.1 /usr/man/u_man/man1/oman.1
	/etc/install -f ${USRBIN} man
	chown ${MANOWN} ${USRBIN}/man
	chmod 4755 ${USRBIN}/man
	mkxref > /usr/man/xref
	chown ${MANOWN} /usr/bin/xref

clean:
	rm -f man mkxref updateall

shar:
	shar README Makefile man.1 man.c mkxref.c updateall.c > man.shar
