diff --git a/Makefile.am b/Makefile.am
index aaef0a7937672a80b64da8ab0e5ecfea2cc6c09b..dc3f7df0bd3528b436cda8f8a47d3b78cc12446d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,8 @@
 if HAVE_PDFLATEX
+if HAVE_BEAMER
 pdf-local: macroprocessor.pdf
 endif
+endif
 
 SRC = macroprocessor.tex old-design.pdf new-design.pdf