diff --git a/Makefile b/Makefile
index dce39f7b6b16c7f0e27fac685dd34dc97ba69bb4..803f04fcacc5119abbc0fca149b50b85618148e9 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ main.sagetex.sout: ${SAGESCRIPT} pymodules
 	sage $?
 
 ${SAGESCRIPT}: ${TEXFILES}
-	pdflatex -interaction=nonstopmode ${MAINTEXFILE}
+	latexmk -interaction=nonstopmode ${MAINTEXFILE}
 
 pymodules: $(addsuffix .py,${SAGEPLOTFILES})
 
@@ -27,11 +27,5 @@ $(addsuffix .py,${SAGEPLOTFILES}): $(addsuffix .sage,${SAGEPLOTFILES})
 .PHONY: clean
 clean:
 	latexmk -C
-	rm -f main.pdf
-	rm -f *.sagetex.*
-	rm -f *.xml
-	rm -f *.sta
-	rm -f *.bbl
-	rm -rf sage-plots-for-main.tex
-	rm -f *.tmp
+	git clean -xf || echo no git repo to use for cleaning