diff --git a/Makefile b/Makefile
index 15e21b6b8c334eae66bf2e9919992641dff5b78f..3252f7682867fda4dbddd7fda1ad91f5593f552c 100644
--- a/Makefile
+++ b/Makefile
@@ -982,6 +982,7 @@ ifeq ($(PYTHON),:)
 	@echo "--------------------------------------------------------------------------"
 	@false
 else
+	@$(INSTALL) -d doc/rest-api
 	$(PYTHON) rest-api-templates/make_ari_stubs.py \
 		rest-api/resources.json .
 endif
diff --git a/doc/.gitignore b/doc/.gitignore
index 27acdb3249f7ba9b8a95bfd65ddd5eafec1b679f..e098ec027f2dcc7c6c46b2d56a1137d8aeee1cd3 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -1 +1,2 @@
 core-en_US.xml
+rest-api
\ No newline at end of file