diff --git a/doc/Makefile.am b/doc/Makefile.am
index ce992bca2d1964872416d7f3d0af6c456e4ef2c9..99bd82d70c65e14f8a0830b2ce3b7e1e59b44679 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -5,9 +5,11 @@ info_TEXINFOS = dynare.texi
 if HAVE_LATEX2HTML
 html-local: dynare.html
 
+# The temporary directory for latex2html (L2H_TMP) must not contain a dot, so
+# enforce standard tmp directory instead of defaulting to current directory
 dynare.html: dynare.texi
 	rm -rf dynare.html
-	texi2any --html --split=section -c L2H=1 -c PREFIX=dynare.html dynare.texi
+	texi2any --html --split=section -c L2H=1 -c L2H_TMP=$${TMPDIR:-/tmp} -c PREFIX=dynare.html dynare.texi
 endif
 
 PDF_TARGETS =