diff --git a/Makefile.am b/Makefile.am
index 9b70186365994629a986ebb09497895b763a3530..afdbb73a5c594673e4e03f1b731d9ddd521811e6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,8 @@
 if HAVE_PDFLATEX
+if HAVE_BEAMER
 pdf-local: preprocessor.pdf
 endif
+endif
 
 SRC = preprocessor.tex expr.png expr-sharing.png matrices.png overview.png