diff --git a/src/Makefile b/src/Makefile
index bcfbbb722..dab423728 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -288,6 +288,10 @@ VIMNAME = vim
 EXNAME = ex
 VIEWNAME = view
 
+# This is needed to be able to create a shadow directory without running
+# configure.  Set this before including auto/config.mk, not after.
+MKDIR_P = mkdir -p
+
 ######################## auto/config.mk ######################## {{{1
 # At this position auto/config.mk is included. When starting from the
 # toplevel Makefile it is almost empty. After running auto/configure it
