MAIN = main_ep
SOURCES = $(MAIN).tex intro.tex ddn.tex xpl.tex asn.tex gec.tex experiments.tex concl.tex abbrev.bib biblioand.bib
LOG=logLatex

pdf: $(MAIN).pdf

$(MAIN).pdf: $(SOURCES)
	@printf "***** Compilation 1 *****\n"
	@pdflatex $(MAIN) > $(LOG)
	@printf "*****    Biblio     *****\n"
	@bibtex $(MAIN) >> $(LOG)
	@printf "***** Compilation 2 *****\n"
	@pdflatex $(MAIN) >> $(LOG)
	@printf "***** Compilation 3 *****\n"
	@pdflatex $(MAIN) >> $(LOG)

all:
	latex 	$(MAIN).tex > $(LOG)
	latex 	$(MAIN).tex >> $(LOG)
	bibtex	$(MAIN) >> $(LOG)
	latex 	$(MAIN).tex >> $(LOG)
	dvips -t a4 $(MAIN).dvi -o >> $(LOG)
	ps2pdf $(MAIN).ps >> $(LOG)

fast:
	latex 	$(MAIN).tex > $(LOG)
	dvips -t a4 $(MAIN).dvi -o >> $(LOG)
	ps2pdf $(MAIN).ps >> $(LOG)

test:
	acroread $(MAIN).pdf

testr:
	kghostview $(MAIN).ps

clean:
	rm -rf *~  *aux *.log *bbl *blg *.dvi *.bak *.thm *.out *.toc *.idx .svn/


# construit l'archive toute prete (pour Springer)
TEXSOURCES = main.tex ddn.tex 
PACKAGES = mathpartir.sty synttree.sty bcprules.sty arydshln.sty
CLSSTY = llncs.cls llncsdoc.sty splncs.bst sprmindx.sty
UTIL = Makefile copyright.pdf CL07-CameraReady.pdf readme	
FILES = $(TEXSOURCES) $(PACKAGES) $(CLSSTY) $(UTIL)

arch:
	zip Archive.zip $(FILES)