##
## Process this file with automake to produce Makefile.in
##
# Because not all installations have LaTeX, this Makefile(.am) will by
# default just copy the pre-built manual.ps from the distribution or
# cvs.
# If you really want to re-generate the manual: gmake force

docdir = $(prefix)/doc
doc_DATA = $(PACKAGE)-manual-$(VERSION).ps

$(PACKAGE)-manual-$(VERSION).ps: $(srcdir)/manual.ps
	cp $(srcdir)/manual.ps $(PACKAGE)-manual-$(VERSION).ps

LATEX_FILES = logo.eps \
              1foreword.tex \
	      2overview.tex \
              3formalism.tex \
              4definition.tex \
              5inout.tex \
              6instuse.tex \
	      7tools.tex \
              8biblio.tex \
	      9index.tex \
              manual.ist \
              manual.tex

EXTRA_DIST = \
	manual.ps \
	$(LATEX_FILES)

force: manual.dvi 
	dvips manual.dvi -o manual.ps

manual.dvi: $(LATEX_FILES)
	for f in $(LATEX_FILES) ;			\
	do 						\
	    [ -e "$$f" ] || ln -s "$(srcdir)/$$f" . ;	\
	done
	latex manual.tex
	latex manual.tex
	makeindex -s manual.ist manual.idx
	cp manual.ind 9index.tex
	latex manual.tex
	latex manual.tex

CLEANFILES = manual.dvi manual.log manual.ilg manual.ind manual.idx \
	     manual.toc *.aux texput.log \
	     $(PACKAGE)-manual-$(VERSION).ps
