# $Header: /nfs/disk222/yeastpub/Repository/powmap/docs/Makefile,v 1.11 2000/10/02 14:51:14 kmr Exp $

SHELL=/bin/sh

SANGER_CAT := /usr/lib/docbooksgml/docbook_sanger.cat

JADE := jade
JADE_PARAM := -t sgml -c $(SANGER_CAT) -d ../artemis.dsl
JADETEX_PARAM := -t tex -c $(SANGER_CAT) -d ../artemis.dsl

html : mkdirs
	(cd art_build; ln -sf ../*.sgml ../*.gif ../*.ps ../*.eps .; \
		$(JADE) $(JADE_PARAM) manual.sgml;\
		$(JADE) -V nochunks $(JADE_PARAM) manual.sgml > artemis_manual_complete.html)
	(cd act_build; ln -sf ../*.sgml ../*.gif ../*.ps ../*.eps .; \
		$(JADE) $(JADE_PARAM) act_manual.sgml;\
		$(JADE) -V nochunks $(JADE_PARAM) manual.sgml > act_manual_complete.html)

tex : mkdirs
	(cd art_build; ln -sf ../*.sgml ../*.gif ../*.ps ../*.eps .; \
		$(JADE) $(JADETEX_PARAM) manual.sgml)
	(cd act_build; ln -sf ../*.sgml ../*.gif ../*.ps ../*.eps .; \
		$(JADE) $(JADETEX_PARAM) act_manual.sgml)

all : clean mkdirs html tex
	(cd art_build; latex -fmt jadetex manual.tex; \
		latex -fmt jadetex manual.tex)
	(cd act_build; latex -fmt jadetex act_manual.tex; \
		latex -fmt jadetex act_manual.tex)

mkdirs :
	if [ ! -d art_build ] ; then mkdir art_build; fi
	if [ ! -d act_build ] ; then mkdir act_build; fi

clean :
	rm -rf art_build act_build
