diff --git a/Makefile b/Makefile
index dc784c6b654e227d76334922b6b526c3d8480e3f..71ecb485ad059da37b4e4c5730e5e7cc58f78d8d 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,7 @@ build: mathjax
 
 .PHONY: mathjax
 mathjax:
-	[ ! -d output/mathjax ] && cp -vr mathjax/es5 output/mathjax || true
+	[ ! -d output/mathjax ] && mkdir -p output && cp -vr mathjax/es5 output/mathjax || true
 
 .PHONY: devserver
 devserver: