DOCUM=docum

# Preklad zatim nejlepe pod Dirigent@golem, kvuli git.
# make -C /GW/root/bibtex/extracts/GolemWiki/ all #@Dg

all:
	make -iB bibtex
	make -iB clean
#	cp $(DOCUM).pdf /GW/Bibliography.pdf
	#cd /GW/;git add .;git commit -am "Bibliography update"
	git add .;git commit -am "Bibliography update"
	pdftotext docum.pdf 
	
bibtex:
	make pdf;bibtex $(DOCUM);make pdf;make pdf
	
pdf:
	pdflatex  $(DOCUM).tex	


bash:	
# obsolete, latex to umi elegantne ..
	grep @ /GW/root/bibtex/golem.bib |grep -v title|grep -v preamble|grep -v template|sed 's/,/}/g;s/@[Aa]rticle\|@misc\|@INPROCEEDINGS\|@CONFERENCE/\\nocite/gI' > bibliography.tex
	
	
clean:
	ls ${DOCUM}.*|grep -v pdf|grep -v tex|xargs rm	
