--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,3 +1,5 @@
+export HOME=.
+
 all: css userguide changelog pdf utlist utstring utarray
 
 userguide:	txt/userguide.txt
@@ -35,7 +37,7 @@
 	rm -f txt/userguide.xml
 
 css: html/toc.css
-	if [ ! -d ~/.asciidoc/themes/tdh ]; then mkdir ~/.asciidoc/themes/tdh; fi
+	if [ ! -d ~/.asciidoc/themes/tdh ]; then mkdir -p ~/.asciidoc/themes/tdh; fi
 	cp html/toc.css ~/.asciidoc/themes/tdh
 
 docbook: txt/userguide.txt
