Combined Makefiles again: These libraries depend on the unix library, but really they depend on either the ("real") unix library or the win32unix library. Include both, with win32unix first, on the basis that this should pick up the correct one in all cases. --- otherlibs/systhreads/Makefile.orig 2008-11-15 17:14:09.000000000 +0000 +++ otherlibs/systhreads/Makefile 2008-11-15 17:14:36.000000000 +0000 @@ -15,8 +15,8 @@ include ../../config/Makefile -CAMLC=../../ocamlcomp.sh -I ../unix -CAMLOPT=../../ocamlcompopt.sh -I ../unix +CAMLC=../../ocamlcomp.sh -I ../win32unix -I ../unix +CAMLOPT=../../ocamlcompopt.sh -I ../win32unix -I ../unix MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib COMPFLAGS=-warn-error A -g --- otherlibs/bigarray/Makefile.orig 2008-11-15 17:14:14.000000000 +0000 +++ otherlibs/bigarray/Makefile 2008-11-15 17:14:54.000000000 +0000 @@ -14,8 +14,8 @@ # $Id: Makefile,v 1.25 2008/01/04 09:52:27 xleroy Exp $ LIBNAME=bigarray -EXTRACFLAGS=-I../unix -DIN_OCAML_BIGARRAY -DCAML_NAME_SPACE -EXTRACAMLFLAGS=-I ../unix +EXTRACFLAGS=-I../win32unix -I../unix -DIN_OCAML_BIGARRAY -DCAML_NAME_SPACE +EXTRACAMLFLAGS=-I ../win32unix -I ../unix COBJS=bigarray_stubs.$(O) mmap_unix.$(O) CAMLOBJS=bigarray.cmo HEADERS=bigarray.h --- myocamlbuild.ml.orig 2008-11-15 17:25:50.000000000 +0000 +++ myocamlbuild.ml 2008-11-15 17:33:13.000000000 +0000 @@ -116,9 +116,11 @@ if partial then ".."/dir else dir;; let unix_dir = - match Sys.os_type with - | "Win32" -> if_partial_dir "otherlibs/win32unix" - | _ -> if_partial_dir "otherlibs/unix";; + if_partial_dir ( + let win32path = "otherlibs/win32unix" in + if Sys.file_exists (win32path / "unix.cma") then win32path + else "otherlibs/unix" + );; let threads_dir = if_partial_dir "otherlibs/threads";; let systhreads_dir = if_partial_dir "otherlibs/systhreads";; --- ocamldoc/Makefile.orig 2008-11-15 17:49:57.000000000 +0000 +++ ocamldoc/Makefile 2008-11-15 17:50:25.000000000 +0000 @@ -62,6 +62,7 @@ INCLUDES_NODEP= -I $(OCAMLSRCDIR)/stdlib \ -I $(OCAMLSRCDIR)/otherlibs/str \ -I $(OCAMLSRCDIR)/otherlibs/dynlink \ + -I $(OCAMLSRCDIR)/otherlibs/win32unix \ -I $(OCAMLSRCDIR)/otherlibs/unix \ -I $(OCAMLSRCDIR)/otherlibs/num \ -I $(OCAMLSRCDIR)/otherlibs/graph