diff --git a/ghc.mk b/ghc.mk
index 1e65b76bd08e5861b9292c139905a338b825e5db..a54d773534fe9573140ced7b23364011aa212f00 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -24,9 +24,16 @@ utils/haddock_dist_MODULES += Paths_haddock
 install: install_utils/haddock_html
 .PHONY: install_utils/haddock_html
 install_utils/haddock_html:
-	"$(RM)" $(RM_OPTS) -r $(DESTDIR)$(docdir)/html
 	$(INSTALL_DIR) $(DESTDIR)$(docdir)/html
 	"$(CP)" -R utils/haddock/html $(DESTDIR)$(docdir)/html
 
+install: install_utils/haddock_data
+.PHONY: install_utils/haddock_data
+install_utils/haddock_data:
+	$(INSTALL_DIR) $(DESTDIR)$(ghclibdir)/html
+	for i in utils/haddock/html/*; do \
+	    $(INSTALL_DATA) $(INSTALL_OPTS) $$i $(DESTDIR)$(ghclibdir)/html; \
+	done
+
 BINDIST_EXTRAS += $(addprefix utils/haddock/,html/*)