diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..4a2dc4da10665028341c7015e491556a29ef4eca
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,14 @@
+if HAVE_PDFLATEX
+all-local: preprocessor.pdf
+endif
+
+SRC = preprocessor.tex expr.png expr-sharing.png matrices.png overview.png
+
+EXTRA_DIST = $(SRC)
+
+preprocessor.pdf: $(SRC)
+	$(PDFLATEX) preprocessor
+	$(PDFLATEX) preprocessor
+
+clean-local:
+	rm -f *.pdf *.toc *.aux *.log *.nav *.snm *.vrb *.out *~
diff --git a/Makefile.in b/Makefile.in
deleted file mode 100644
index 15e23adb41e306153b059dc968d34715336641f4..0000000000000000000000000000000000000000
--- a/Makefile.in
+++ /dev/null
@@ -1,14 +0,0 @@
-PDFLATEX = @PDFLATEX@
-
-preprocessor.pdf: preprocessor.tex expr.png expr-sharing.png matrices.png overview.png
-ifdef PDFLATEX
-	$(PDFLATEX) preprocessor
-	$(PDFLATEX) preprocessor
-endif
-
-clean:
-	rm -f *.pdf *.toc *.aux *.log *.nav *.snm *.vrb *.out *~
-.PHONY: clean
-
-Makefile: Makefile.in ../../config.status
-	cd ../.. && ./config.status