MAN=manual
INPUTS=macros.tex cover.tex acknow.tex intro.tex use.tex debugger.tex \
       format-defs.tex direct-cc.tex pl-bips.tex fd-cstr.tex \
       c-interface.tex references.tex tbl-contents.tex the-index.tex \
       version_no.tex
TEX_SRC=$(MAN).tex $(INPUTS)



help:
	@echo
	@echo '*** Please read the README file ***'
	@echo
	@echo 'make all       make DVI, PostScript and HTML versions'
	@echo 'make dvi       make DVI version (needs LaTeX2e)'
	@echo 'make ps        make PostScript version (needs dvips)'
	@echo 'make html      make HTML version (needs HeVeA)'
	@echo
	@echo 'make clean     remove all temporary files'
	@echo 'make distclean same as clean'
	@echo 'make clean-all remove all versions'
	@echo
	@echo 'make help      this help'
	@echo


all: dvi ps html

dvi: fp $(MAN).dvi

fp:
	@./check_fp $(MAN) 0


$(MAN).dvi: $(TEX_SRC)
	latex $(MAN).tex
	makeindex $(MAN).idx
	$(MAKE) dvi

ps: dvi $(MAN).ps

$(MAN).ps: $(MAN).dvi
	dvips -o $(MAN).ps -D 300 $(MAN).dvi


html: Html/index.html

Html/index.html: $(MAN).dvi custom.hva
	-rm -f Html/index.html Html/$(MAN)*.html
	hevea -s custom.hva $(MAN).tex -o Html/$(MAN).html
	(cd Html; hacha $(MAN).html)
	-rm -f Html/$(MAN).html

clean:
	-rm -f $(MAN).aux $(MAN).toc $(MAN).idx *.*.fp


distclean: clean


clean-all: distclean
	-rm -f $(MAN).dvi $(MAN).ps Html/$(MAN)*.html Html/index.html


