--- Makefile.orig	2010-06-11 06:35:30.000000000 -0700
+++ Makefile	2013-03-25 20:23:46.000000000 -0700
@@ -34,7 +34,11 @@
 PATH := $(BIN):$(SRC)/bin:$(shell echo $$PATH)
 CP := /bin/cp -fpR
 GZIP := gzip --force --best
+ifeq ($(TARGET), mingw32)
+RANLIB := $(TARGET)-ranlib
+else
 RANLIB := ranlib
+endif
 
 # If we're compiling with another version of MLton, then we want to do
 # another round of compilation so that we get a MLton built without
@@ -401,6 +405,10 @@
 	cd "$(TLIB)/sml"; for i in */[Dd]oc; do mv "$$i" "$(TDOC)/$$i"; done
 	cd "$(TLIB)/sml"; for i in */README*; do mv "$$i" "$(TDOC)/$$i"; done
 
+remove-docs:
+	cd "$(TLIB)/sml"; for i in */[Dd]oc; do rm -rf "$$i"; done
+	cd "$(TLIB)/sml"; for i in */README*; do rm -rf "$$i"; done
+
 .PHONY: release
 release: version
 	tar cvzf ../mlton-$(VERSION).tar.gz \