diff --git a/GNUmakefile.in b/GNUmakefile.in
index afdfd9f0a6..31a2a1fcf0 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -16,9 +16,15 @@ all:
 docs:
 	$(MAKE) -C doc all
 
+ifndef SKIPDOCS
 $(call recurse,world,doc src config contrib,all)
 world:
 	+@echo "PostgreSQL, contrib, and documentation successfully made. Ready to install."
+else
+$(call recurse,world,src config contrib,all)
+world:
+	+@echo "PostgreSQL and contrib successfully made. Ready to install."
+endif
 
 # build src/ before contrib/
 world-contrib-recurse: world-src-recurse
@@ -32,9 +38,15 @@ install:
 install-docs:
 	$(MAKE) -C doc install
 
+ifndef SKIPDOCS
 $(call recurse,install-world,doc src config contrib,install)
 install-world:
 	+@echo "PostgreSQL, contrib, and documentation installation complete."
+else
+$(call recurse,install-world,src config contrib,install)
+install-world:
+	+@echo "PostgreSQL and contrib installation complete."
+endif
 
 # build src/ before contrib/
 install-world-contrib-recurse: install-world-src-recurse
