#
# $Id: Makefile,v 1.2 1995/02/21 09:03:58 gaertner Exp gaertner $
#
# Makefile for the pretzel projcet documentation
#
# $Log: Makefile,v $
# Revision 1.2  1995/02/21  09:03:58  gaertner
# Installed dependency between input and output files in the
# rules that produce report and manual in order to be able to
# just type `make' if I have changed anything.
#
# Revision 1.1  1994/10/24  18:38:14  gaertner
# Initial revision
#
#


# where to copy any latex styles to:
TEXINPUTSDIR	= /users/gaertner/tex/inputs

# name of the main documentation frame (without .tex):
REPORT	= report

# name of the user manual frame (without .tex):
MANUAL	= manual

# which dvi file should be made by default?
DOCUMENT = report.dvi

# text files that belong only to the report:
REPFILES= report-title.tex abstract.tex report-intro.tex	\
		chap1.tex chap2.tex chap3.tex chap4.tex		\
		chap5.tex acknowledge.tex appendix.tex		\
		report.tex report-title2.tex

# text files that belong only to the manual:
MANFILES= manual-title.tex manual-intro.tex

# text files that belong to both:
BOTHFILES= chap2.tex 						\
		../bibliographies/prettyprinting.bib 		\
		../bibliographies/litprog.bib 			\
		../bibliographies/supplemental.bib		\
		../figures/pretzel-in-concept.latex 		\
		../figures/pretzel-in-concept.fig		\
		../figures/pp-concept.latex 			\
		../figures/pp-concept.fig			\
		../figures/module-depends.latex 		\
		../figures/module-depends.fig 			\
		../figures/generator-funs.latex 		\
		../figures/generator-funs.fig			\
		../figures/detailed-concept.latex 		\
		../figures/detailed-concept.fig			\
		../figures/concept.fig

# other files for the distribution:
#DISTFILES=

# name of the distribution:
#DISTNAME = pretzel-doc


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

doc: $(DOCUMENT)

$(REPORT): $(REPORT).dvi

$(REPORT).dvi: $(REPFILES) $(BOTHFILES)
	latex $(REPORT).tex
	makeindex $(REPORT)
	bibtex $(REPORT)
	latex $(REPORT).tex
	latex $(REPORT).tex

fullreport: $(REPORT) itititle
	echo Sorry for this, but you will have to do some work here:
	echo Look at the README file.

itititle:
	latex2e report-title2.tex


$(MANUAL): $(MANUAL).dvi

$(MANUAL).dvi: $(MANFILES) $(BOTHFILES)
	latex $(MANUAL).tex
	makeindex $(MANUAL)
	latex $(MANUAL).tex

# packedreport - make a dvi.gz of the entire report
packedreport: $(REPORT)
	gzip $(REPORT).dvi

clean:
	rm -f *.toc *.log *.aux *.idx *.ilg *.bbl *.blg *.ind

clobber: clean
	rm -f *.dvi

bundle:
	tar cf $(DISTNAME).tar $(REPFILES) $(MANFILES) $(BOTHFILES)	\
		$(DISTFILES)


release:

