# set here all the sources files
# required to build anr.pdf
SOURCES=	anr.tex anr.bib anr.sty section-1.tex \
			section-2.tex section-issues.tex section-position.tex \
		 	flow2.pdf section-etat-de-art.tex section-objectif.tex \
			section-project-description.tex section-project-management.tex \
			architecture-csg.pdf architecture-hls.pdf architecture-hpc.pdf \
			dependence-task-h.pdf \
			task-management.tex   task-backbone.tex \
			task-csg.tex          task-frontend.tex \
			task-backend.tex      task-hpc.tex \
			task-demonstrator.tex task-dissemination.tex \
			section-project-task-schedule.tex \
			section-dissemination.tex \
			section-consortium-desc.tex \
			section-consortium-leader.tex \
			section-consortium-people.tex \
			section-ressources.tex \
			annexe-cv.tex \
			annexe-autre-participation.tex \
			annexe-reponse.tex

TABLES= \
		table_inria_cairn_full.tex table_inria_cairn_short.tex \
		table_inria_compsys_full.tex table_inria_compsys_short.tex \
		table_tima_full.tex table_tima_short.tex \
		table_ubs_full.tex table_ubs_short.tex \
		table_upmc_full.tex table_upmc_short.tex \
		table_bull_full.tex table_bull_short.tex \
		table_thales_full.tex table_thales_short.tex \
		table_mds_full.tex table_mds_short.tex

# PROGRAMS
FIG2DEV = fig2dev

%.pdf: %.fig
	@echo "Converting $< to $@"
	@$(FIG2DEV) -L pdf -p aaa $< $@

anr.pdf: $(SOURCES) gantt
	mkdir -p tmp
	touch gantt.tex gantt1.tex gantt2.tex  $(TABLES)
	@echo "Generating pdf file"
	@pdflatex anr.tex || true
	@bibtex anr 
	@./gantt < anr.gantt
	@pdflatex anr.tex 
	@pdflatex anr.tex 
	@grep ndefine anr.log


gantt: gantt.l
	@flex gantt.l && gcc -g lex.yy.c -o gantt
	@rm lex.yy.c

clean:
	rm -f $(TABLES) anr.aux gantt.tex gantt1.tex gantt2.tex anr.pdf anr.gantt
