# transcript/lib/Makefile.bsd
#
# Copyright (c) 1985 Adobe Systems Incorporated. All Rights Reserved. 
# GOVERNMENT END USERS: See notice of rights in Notice file in release directory.
# RCSID: $Header: /afs/sipb/project/sipb-athena/src/transcript-v2.1/lib/RCS/Makefile,v 1.3 1995/11/05 21:19:40 ghudson Exp $

OMFLAGS= $(MFLAGS) RM="$(RM)"

FILES = enscript.pro ps4014.pro ps630.pro pscat.pro psplot.pro psdit.pro \
	ehandler.ps uartpatch.ps bogusmsg.ps \
	font.map Notice

#PRG = psint.sh psbad.sh
RM=rm -f

programs all:
#	$(RM) psint.sh
#	sed -e s,XPSLIBDIRX,$$PSLIBDIR,g \
#	    -e s,XPSTEMPDIRX,$$PSTEMPDIR,g \
#	    -e s,XBANNERFIRSTX,$$BANNERFIRST,g \
#	    -e s,XBANNERLASTX,$$BANNERLAST,g \
#	    -e s,XREVERSEX,$$REVERSE,g \
#	    -e s,XVERBOSELOGX,$$VERBOSELOG,g \
#		psint.proto >psint.sh

install: 
	cd $(DESTDIR)/$$PSLIBDIR; $(RM) -r - ${FILES} *.afm 
	cp ${FILES} *.afm $(DESTDIR)/$$PSLIBDIR
	-cd $(DESTDIR)/$$PSLIBDIR; chown $$OWNER ${FILES} *.afm; \
		chgrp $$GROUP ${FILES} *.afm; \
		chmod 644 ${FILES} *.afm;
#	cd $(DESTDIR)/$$PSLIBDIR; \
#		ln psint.sh psif; ln psint.sh psof; ln psint.sh psnf; \
#		ln psint.sh pstf; ln psint.sh psgf; ln psint.sh psvf; \
#		ln psint.sh psdf; ln psint.sh pscf; ln psint.sh psrf; \
#		ln psint.sh psiflps40; ln psint.sh psoflps40; \
#		ln psbad.sh psbad
	-$(RM) -r $(DESTDIR)/$$PSLIBDIR/troff.font \
		$(DESTDIR)/$$PSLIBDIR/ditroff.font
	-mkdir $(DESTDIR)/$$PSLIBDIR/troff.font \
		$(DESTDIR)/$$PSLIBDIR/ditroff.font
	-cp troff.font/* $(DESTDIR)/$$PSLIBDIR/troff.font
	-chmod a+x $(DESTDIR)/$$PSLIBDIR/troff.font/makefontdir
	-cd $(DESTDIR)/$$PSLIBDIR/troff.font; \
		${MAKE} ${OMFLAGS} startup $$FONTFAMILIES DESTDIR=$(DESTDIR)
	-cd $(DESTDIR)/$$PSLIBDIR/troff.font; chown $$OWNER . * ; chgrp $$GROUP . *
	-cp ditroff.font/* $(DESTDIR)/$$PSLIBDIR/ditroff.font
	-cd $(DESTDIR)/$$PSLIBDIR/ditroff.font; \
		${MAKE} ${OMFLAGS} startup $$FONTFAMILIES DESTDIR=$(DESTDIR) install
	-cd $(DESTDIR)/$$PSLIBDIR/ditroff.font; \
		${MAKE} ${OMFLAGS} -f Make.family doit $$FONTFAMILIES DESTDIR=$(DESTDIR)
	-cd $(DESTDIR)/$$PSLIBDIR/ditroff.font; chown $$OWNER . * ; chgrp $$GROUP . *

clean:
	$(RM) - *.BAK *.CKP .emacs_[0-9]* .*~ psint.sh
	cd troff.font; ${MAKE} ${OMFLAGS} clean
	cd ditroff.font; ${MAKE} ${OMFLAGS} clean
