1 and 2 checked
[bsc-thesis1415.git] / thesis2 / Makefile
index 38fb5c3..00cf6f9 100644 (file)
@@ -1,12 +1,15 @@
 SHELL:=/bin/bash
 VERSION:=1.0RC1
 SOURCES:=$(shell ls *.tex) scheme.xsd exrss.xml
-GRAPHS:=$(addsuffix .eps,$(basename $(shell ls *.dot)))
+GRAPHS:=$(addsuffix .eps,$(basename $(shell ls *.{dot,png})))
 
-.PHONY: clobber graphs
+.PHONY: clobber graphs release
 
 all: graphs thesis.pdf
 
+%.eps: %.png
+       convert $< $@
+
 %.eps: %.dot
        dot -Teps < $< > $@
 
@@ -14,15 +17,18 @@ all: graphs thesis.pdf
        dvipdfm $<
 
 %.dvi: $(SOURCES)
-       latex -shell-escape thesis.tex
-       bibtex thesis.aux
-       latex -shell-escape thesis.tex
-       latex -shell-escape thesis.tex
+       latex $(basename $@).tex
+       bibtex $(basename $@).aux
+       latex $(basename $@).tex
+       latex $(basename $@).tex
 
 graphs: $(GRAPHS)
 
 clean:
-       @$(RM) -v *.{eps,aux,bbl,blg,dvi,log,out,toc}
+       $(RM) -v *.{eps,aux,bbl,blg,dvi,log,out,toc}
 
 clobber: clean
-       @$(RM) -v *.pdf
+       $(RM) -v *.pdf
+
+release: all clean
+       mv thesis.pdf thesis_$(VERSION).pdf