# Makefile for xyplot documents and man pages
 
include ../Make.var
 
## note: use "cp" and *not* $(CONNECT) for man pages

install:
	test -d $(DMAN)
	cp xyplot.l $(DMAN)/xyplot.$(EXTENSION) 
	cp xyps.l $(DMAN)/xyps.$(EXTENSION) 

deinstall:
	-/bin/rm -f $(DMAN)/xyplot.$(EXTENSION) $(DMAN)/xyps.$(EXTENSION)
        
doc:  xyman.dvi

TXYFILES = ex1.t ex2.t ex3.t ex4.t ex5.t ex6.t
PSXYFILES = $(TXYFILES:t=ps)

%.ps: %.xy
	-xyplot -xyil $< | xyps -d > $@
	
symbols.xy: allsymbols
	chmod +x showall
	showall < allsymbols > symbols.xy

ex%.t: ex%.xy
	sh fix < $< > $@ 

xyplot.elt: xyplot.el
	sh fix < xyplot.el > $@

clean:
	/bin/rm -f *~ *.t *.aux *.log *.dvi ex?.ps symbols.* xyplot.elt
 
empty:
	make clean
	/bin/rm -f xyman.ps
 
xyman.dvi: xyman.tex $(TXYFILES) $(PSXYFILES) symbols.ps xyplot.elt
	-latex xyman
	## latex is run again to resolve references
	-latex xyman

####### Note, different installations use different dvi->ps routines;
####### For example, at SFI, use "dvitps xyman > xyman.ps"
 
#xyman.ps: xyman.dvi
#	echo "do all pro" > /tmp/in-dvips
#	echo ""          >> /tmp/in-dvips
#	dvips xyman < /tmp/in-dvips
#	/bin/rm -f /tmp/in-dvips

 
##
