#	$Source: /mit/postscript/pshalf/RCS/Makefile,v $
#	$Author: jtkohl $
#	$Header: Makefile,v 1.2 88/01/07 17:44:13 jtkohl Exp $
#
# Makefile for pshalf
#
# home for pshalf
BINDIR=/mit/postscript
#
# home for pshalf.ps 
PSDIR=/mit/postscript/lib
#
MANDIR=/usr/man/manl
MANEXT=l

all:		pshalf pshalf.1

pshalf: 	pshalf.ps prepshalf.ps pshalf.proto squeeze
		squeeze < pshalf.ps | sed -e '1d' -e 's/\(.*\)/print "\1"/' > tmp
		sed -e '/PROLOG/r tmp' -e '/PROLOG/d' < pshalf.proto > pshalf.xxx
		rm tmp
		squeeze < prepshalf.ps | sed -e '1d' -e 's/\(.*\)/print "\1"/' > tmp
		sed -e '/PREPRO/r tmp' -e '/PREPRO/d' < pshalf.xxx > pshalf
		rm tmp pshalf.xxx
		chmod +x pshalf

pshalf.1:	pshalf.1.proto Makefile
		sed -e "s;PSDIR;$(PSDIR);" < pshalf.1.proto > pshalf.1

squeeze:	squeeze.c
		cc -O squeeze.c -o squeeze

install:	all
		install -c pshalf $(BINDIR)
		install -c pshalf.ps $(PSDIR)
		install -c prepshalf.ps $(PSDIR)
#		install -c pshalf.1 $(MANDIR)/pshalf.$(MANEXT)

shar:		
		shar README Makefile pshalf.proto pshalf.ps pshalf.1.proto \
			diffs.psdit squeeze.c > sharfile

clean:
		rm -f sharfile pshalf pshalf.1 squeeze
