# SCCS-info %W% %E%
#
# /*--------------------------------------------------------------------*/
# /*                                                                    */
# /*              VCG : Visualization of Compiler Graphs                */
# /*              --------------------------------------                */
# /*                                                                    */
# /*   file:         Makefile                                           */
# /*   version:      1.00.00                                            */
# /*   creation:     1.4.1993                                           */
# /*   author:       I. Lemke  (...-Version 0.99.99)                    */
# /*                 G. Sander (Version 1.00.00-...)                    */
# /*                 Universitaet des Saarlandes, W-66041 Saarbruecken  */
# /*                 ESPRIT Project #5399 Compare                       */
# /*   description:  Makefile of the documentation                      */
# /*                 D 3.12.1/1: The visualisation of compiler graphs   */
# /*   status:       in work                                            */
# /*                                                                    */
# /*--------------------------------------------------------------------*/
#
# $Id: Makefile,v 1.5 1994/01/21 20:18:45 sander Exp sander $
#
# $Log: Makefile,v $
# Revision 1.5  1994/01/21  20:18:45  sander
# Install problem for Sys V solved.
# SYS.README added.
# Picture processing with uuencode added.
#
#

#========================= CHANGE AREA =========================

SHELL = /bin/sh
RM = /bin/rm 
CP = /bin/cp 
LATEX = latex
BIGLATEX = big-latex
TRANSFIGTEX = fig2ps2tex
TRANSFIGPS  = fig2dev

# RCS check out shellscript (normally not used)
CHECKOUT = co

# RCS check edit shellscript (normally not used)
CHECKEDIT = ce

# RCS check in shellscript (normally not used)
CHECKIN  = ci

# Spelling checker (assumes to take dvi-files and tex-files)
SPELL = /TeX/bin/texspell -l

#==================== END OF CHANGE AREA ======================

#-------------------------------------------------------------------

# The LaTeX source files

SOURCES =   visual.tex intro.tex part1.tex part2.tex part3.tex \
      part4.tex part5.tex bibl.tex concl.tex exa1.ps           \
      exa2.ps foldpath.fig foldtree.fig hideedge.fig window.fig\
      transfig1.tex vis_short.tex transshort.tex part0.tex     \
      exa1a.ps exa1b.ps exa3baft.ps exa3madsft.ps exa3madsnt.ps	        \
      exa3maft.ps exa3maidft.ps exa3maidnt.ps exa3mant.ps exa3midft.ps  \
      exa3midnt.ps exa3midsft.ps exa3midsnt.ps exa3mift.ps exa3miidft.ps\
      exa3miidnt.ps exa3mint.ps exa3miodft.ps exa3miodnt.ps exa4.ps     \
      expo.ps fsel.ps screen.ps down.ps nondown.ps exa5a.ps exa5b.ps    \
      exa5c.ps


LONG_PICTURES = foldpath.ps foldpath1.tex foldtree.ps foldtree1.tex \
      hideedge.ps hideedge1.tex window.ps window1.tex  

SHORT_PICTURES = foldpath2.tex foldtree2.tex hideedge2.tex window2.tex 

# Temporary generated picture files. These are not part of a distribution.

GEN_PICTURES = foldpath.tex foldtree.tex hideedge.tex window.tex

# These files are binaries, thus they are uuencoded in the distribution

BINARIES = exa1.1bit exa2.1bit exa1.pbm exa2.pbm \
	   fsel.1bit expo.1bit screen.1bit       \
	   fsel.pbm  expo.pbm  screen.pbm        

# These files are generated, but included into a distribution.
# They are in the directory preconf. 

GEN_DISTFILES = visual.dvi visual.ps vis_short.dvi \
	$(LONG_PICTURES) $(SHORT_PICTURES)

# Other files of the distribution: encoded stuff etc.

OTHERS = exa1.vcg exa1a.vcg exa1b.vcg exa2.vcg exa3.vcg exa4.vcg  \
	exa1.1bit.uue exa1.pbm.uue \
	exa1a.1bit.uue exa1a.pbm.uue \
	exa1b.1bit.uue exa1b.pbm.uue \
	exa2.1bit.uue exa2.pbm.uue \
	exa3baft.1bit.uue exa3baft.pbm.uue \
	exa3madsft.1bit.uue exa3madsft.pbm.uue \
	exa3madsnt.1bit.uue exa3madsnt.pbm.uue \
	exa3maft.1bit.uue exa3maft.pbm.uue \
	exa3maidft.1bit.uue exa3maidft.pbm.uue \
	exa3maidnt.1bit.uue exa3maidnt.pbm.uue \
	exa3mant.1bit.uue exa3mant.pbm.uue \
	exa3midft.1bit.uue exa3midft.pbm.uue \
	exa3midnt.1bit.uue exa3midnt.pbm.uue \
	exa3midsft.1bit.uue exa3midsft.pbm.uue \
	exa3midsnt.1bit.uue exa3midsnt.pbm.uue \
	exa3mift.1bit.uue exa3mift.pbm.uue \
	exa3miidft.1bit.uue exa3miidft.pbm.uue \
	exa3miidnt.1bit.uue exa3miidnt.pbm.uue \
	exa3mint.1bit.uue exa3mint.pbm.uue \
	exa3miodft.1bit.uue exa3miodft.pbm.uue \
	exa3miodnt.1bit.uue exa3miodnt.pbm.uue \
	exa4.1bit.uue exa4.pbm.uue down.vcg nondown.vcg \
	exa5.vcg \
	fsel.pbm.uue  expo.pbm.uue  screen.pbm.uue \
	fsel.1bit.uue expo.1bit.uue screen.1bit.uue \
	grammar.txt README README.SYS README.ANNOUNCE \
	README.ANNOUNCE2

#-------------------------------------------------------------------- 

all: visual.dvi 

long:  visual.dvi

short: vis_short.dvi

visual.dvi: $(SOURCES) $(LONG_PICTURES)
	$(CP)	  foldpath1.tex foldpath.tex
	$(CP)	  foldtree1.tex foldtree.tex
	$(CP)	  hideedge1.tex hideedge.tex
	$(CP)	  window1.tex   window.tex
	$(LATEX) visual.tex || $(CP) preconf/visual.dvi .
	$(LATEX) visual.tex || $(CP) preconf/visual.dvi .
	$(LATEX) visual.tex || $(CP) preconf/visual.dvi .
	$(LATEX) visual.tex || $(CP) preconf/visual.dvi .

vis_short.dvi: $(SOURCES) $(SHORT_PICTURES)
	$(CP)	  foldpath2.tex foldpath.tex
	$(CP)	  foldtree2.tex foldtree.tex
	$(CP)	  hideedge2.tex hideedge.tex
	$(CP)	  window2.tex   window.tex
	$(BIGLATEX) vis_short.tex || $(CP) preconf/vis_short.dvi .
	$(BIGLATEX) vis_short.tex || $(CP) preconf/vis_short.dvi .
	$(BIGLATEX) vis_short.tex || $(CP) preconf/vis_short.dvi .
	$(BIGLATEX) vis_short.tex || $(CP) preconf/vis_short.dvi .

visual.ps: visual.dvi
	dvips visual.dvi

vis_short.ps: vis_short.dvi
	dvips vis_short.dvi


visual.spell \
spell:  visual.dvi visual.tex
	$(SPELL) -d visual.dvi -t visual.tex > visual.spell

vis_short.spell \
spell:  vis_short.dvi vis_short.tex
	$(SPELL) -d vis_short.dvi -t vis_short.tex > vis_short.spell


# Please, never do a "make grammar".
# This is only for me. (GS)
#
grammar:
	(cd docutils; \
 	extract_gramm ../../src/grammar.pgs; \
 	prepare_gramm ../../src/grammar.pgs.txt > ../grammar.txt)


# The target 'binfiles' creates the unencoded version of the binary files

binfiles: exa1.1bit exa1.pbm exa1a.1bit exa1a.pbm \
	exa1b.1bit exa1b.pbm exa2.1bit exa2.pbm \
	exa3baft.1bit exa3baft.pbm exa3madsft.1bit exa3madsft.pbm \
	exa3madsnt.1bit exa3madsnt.pbm exa3maft.1bit exa3maft.pbm \
	exa3maidft.1bit exa3maidft.pbm exa3maidnt.1bit exa3maidnt.pbm \
	exa3mant.1bit exa3mant.pbm exa3midft.1bit exa3midft.pbm \
	exa3midnt.1bit exa3midnt.pbm exa3midsft.1bit exa3midsft.pbm \
	exa3midsnt.1bit exa3midsnt.pbm exa3mift.1bit exa3mift.pbm \
	exa3miidft.1bit exa3miidft.pbm exa3miidnt.1bit exa3miidnt.pbm \
	exa3mint.1bit exa3mint.pbm exa3miodft.1bit exa3miodft.pbm \
	exa3miodnt.1bit exa3miodnt.pbm exa4.1bit exa4.pbm 
	
# RCS Version control stuff
	
$(SOURCES):
	$(CHECKOUT) $@

$(OTHERS):
	$(CHECKOUT) $@

checkout: Makefile $(SOURCES) $(OTHERS)

checkedit: Makefile
	$(CHECKEDIT) $(SOURCES) $(OTHERS)

checkin: Makefile
	$(CHECKIN) $(SOURCES) $(OTHERS)


clean:
	$(RM) -f *.aux *.toc *.log *.lof *.lot *.spell tmp* core
 
veryclean: clean
	$(RM) -f *.dvi $(GEN_DISTFILES) $(GEN_PICTURES)

targetclean: veryclean


distclean: veryclean targetclean 
	$(RM) -f core

install:

depend: 

tar: Makefile $(SOURCES) $(OTHERS) $(GEN_DISTFILES) 
	$(RM) -f preconf/*
	$(CP) $(GEN_DISTFILES) preconf
	tar -cf doc.tar Makefile $(SOURCES) $(OTHERS) preconf 

dist: grammar tar

# translation into ps
# Since we must use PostScipt for the screendumps, we also use PostScript
# for the figures.

foldpath1.tex: foldpath.ps 
	$(TRANSFIGTEX) foldpath.ps > foldpath1.tex \
	|| $(CP) preconf/foldpath1.tex .

foldpath.ps: foldpath.fig 
	$(TRANSFIGPS) -L ps foldpath.fig > foldpath.ps \
	|| $(CP) preconf/foldpath.ps .

foldtree1.tex: foldtree.ps 
	$(TRANSFIGTEX) foldtree.ps > foldtree1.tex \
	|| $(CP) preconf/foldtree1.tex .

foldtree.ps: foldtree.fig 
	$(TRANSFIGPS) -L ps foldtree.fig > foldtree.ps \
	|| $(CP) preconf/foldtree.ps .

hideedge1.tex: hideedge.ps 
	$(TRANSFIGTEX) hideedge.ps > hideedge1.tex \
	|| $(CP) preconf/hideedge1.tex .

hideedge.ps: hideedge.fig 
	$(TRANSFIGPS) -L ps hideedge.fig > hideedge.ps \
	|| $(CP) preconf/hideedge.ps .

window1.tex: window.ps 
	$(TRANSFIGTEX) window.ps > window1.tex \
	|| $(CP) preconf/window1.tex .

window.ps: window.fig 
	$(TRANSFIGPS) -L ps window.fig > window.ps \
	|| $(CP) preconf/window.ps .


# translation into pictex
# This is used for the short documentation.

foldpath2.tex: foldpath.fig 
	fig2dev -L pictex foldpath.fig > foldpath2.tex \
	|| $(CP) preconf/foldpath2.tex .

foldtree2.tex: foldtree.fig 
	fig2dev -L pictex foldtree.fig > foldtree2.tex \
	|| $(CP) preconf/foldtree2.tex .

hideedge2.tex: hideedge.fig 
	fig2dev -L pictex hideedge.fig > hideedge2.tex \
	|| $(CP) preconf/hideedge2.tex .

window2.tex: window.fig 
	fig2dev -L pictex window.fig > window2.tex \
	|| $(CP) preconf/window2.tex .


# Pictures

fsel.1bit: fsel.1bit.uue
	uudecode fsel.1bit.uue

expo.1bit: expo.1bit.uue
	uudecode expo.1bit.uue

screen.1bit: screen.1bit.uue
	uudecode screen.1bit.uue

fsel.pbm: fsel.pbm.uue
	uudecode fsel.pbm.uue

expo.pbm: expo.pbm.uue
	uudecode expo.pbm.uue

screen.pbm: screen.pbm.uue
	uudecode screen.pbm.uue

exa1.1bit: exa1.1bit.uue 
	uudecode exa1.1bit.uue

exa1.pbm: exa1.pbm.uue 
	uudecode exa1.pbm.uue

exa1a.1bit: exa1a.1bit.uue 
	uudecode exa1a.1bit.uue

exa1a.pbm: exa1a.pbm.uue 
	uudecode exa1a.pbm.uue

exa1b.1bit: exa1b.1bit.uue 
	uudecode exa1b.1bit.uue

exa1b.pbm: exa1b.pbm.uue 
	uudecode exa1b.pbm.uue

exa2.1bit: exa2.1bit.uue 
	uudecode exa2.1bit.uue

exa2.pbm: exa2.pbm.uue 
	uudecode exa2.pbm.uue

exa3baft.1bit: exa3baft.1bit.uue 
	uudecode exa3baft.1bit.uue

exa3baft.pbm: exa3baft.pbm.uue 
	uudecode exa3baft.pbm.uue

exa3madsft.1bit: exa3madsft.1bit.uue 
	uudecode exa3madsft.1bit.uue

exa3madsft.pbm: exa3madsft.pbm.uue 
	uudecode exa3madsft.pbm.uue

exa3madsnt.1bit: exa3madsnt.1bit.uue 
	uudecode exa3madsnt.1bit.uue

exa3madsnt.pbm: exa3madsnt.pbm.uue 
	uudecode exa3madsnt.pbm.uue

exa3maft.1bit: exa3maft.1bit.uue 
	uudecode exa3maft.1bit.uue

exa3maft.pbm: exa3maft.pbm.uue 
	uudecode exa3maft.pbm.uue

exa3maidft.1bit: exa3maidft.1bit.uue 
	uudecode exa3maidft.1bit.uue

exa3maidft.pbm: exa3maidft.pbm.uue 
	uudecode exa3maidft.pbm.uue

exa3maidnt.1bit: exa3maidnt.1bit.uue 
	uudecode exa3maidnt.1bit.uue

exa3maidnt.pbm: exa3maidnt.pbm.uue 
	uudecode exa3maidnt.pbm.uue

exa3mant.1bit: exa3mant.1bit.uue 
	uudecode exa3mant.1bit.uue

exa3mant.pbm: exa3mant.pbm.uue 
	uudecode exa3mant.pbm.uue

exa3midft.1bit: exa3midft.1bit.uue 
	uudecode exa3midft.1bit.uue

exa3midft.pbm: exa3midft.pbm.uue 
	uudecode exa3midft.pbm.uue

exa3midnt.1bit: exa3midnt.1bit.uue 
	uudecode exa3midnt.1bit.uue

exa3midnt.pbm: exa3midnt.pbm.uue 
	uudecode exa3midnt.pbm.uue

exa3midsft.1bit: exa3midsft.1bit.uue 
	uudecode exa3midsft.1bit.uue

exa3midsft.pbm: exa3midsft.pbm.uue 
	uudecode exa3midsft.pbm.uue

exa3midsnt.1bit: exa3midsnt.1bit.uue 
	uudecode exa3midsnt.1bit.uue

exa3midsnt.pbm: exa3midsnt.pbm.uue 
	uudecode exa3midsnt.pbm.uue

exa3mift.1bit: exa3mift.1bit.uue 
	uudecode exa3mift.1bit.uue

exa3mift.pbm: exa3mift.pbm.uue 
	uudecode exa3mift.pbm.uue

exa3miidft.1bit: exa3miidft.1bit.uue 
	uudecode exa3miidft.1bit.uue

exa3miidft.pbm: exa3miidft.pbm.uue 
	uudecode exa3miidft.pbm.uue

exa3miidnt.1bit: exa3miidnt.1bit.uue 
	uudecode exa3miidnt.1bit.uue

exa3miidnt.pbm: exa3miidnt.pbm.uue 
	uudecode exa3miidnt.pbm.uue

exa3mint.1bit: exa3mint.1bit.uue 
	uudecode exa3mint.1bit.uue

exa3mint.pbm: exa3mint.pbm.uue 
	uudecode exa3mint.pbm.uue

exa3miodft.1bit: exa3miodft.1bit.uue 
	uudecode exa3miodft.1bit.uue

exa3miodft.pbm: exa3miodft.pbm.uue 
	uudecode exa3miodft.pbm.uue

exa3miodnt.1bit: exa3miodnt.1bit.uue 
	uudecode exa3miodnt.1bit.uue

exa3miodnt.pbm: exa3miodnt.pbm.uue 
	uudecode exa3miodnt.pbm.uue

exa4.1bit: exa4.1bit.uue 
	uudecode exa4.1bit.uue

exa4.pbm: exa4.pbm.uue 
	uudecode exa4.pbm.uue
