diff --git a/Makefile b/Makefile index 2df847c3..7c2cda97 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: all install clean doc github -EXT_OBJ=$(ocamlfind ocamlc -config | awk '/^ext_obj:/ {print $2}') -EXT_LIB=$(ocamlfind ocamlc -config | awk '/^ext_lib:/ {print $2}') +EXT_OBJ:=$(shell ocamlfind ocamlc -config | awk '/^ext_obj:/ {print $$2}') +EXT_LIB:=$(shell ocamlfind ocamlc -config | awk '/^ext_lib:/ {print $$2}') OCAMLBUILD = ocamlbuild -use-ocamlfind -classic-display -no-links \ -cflags "-w A-4-33-40-41-42-43-34-44" diff --git a/discover.ml b/discover.ml index 80a009a5..a937fae5 100644 --- a/discover.ml +++ b/discover.ml @@ -39,7 +39,8 @@ module Flag = struct let check flag = let pkgs = String.concat " " flag.findlib_checks in - let cmd = sprintf "ocamlfind query %s 1>/dev/null 2>/dev/null" pkgs in + let null = if Sys.os_type = "Win32" then "NUL" else "/dev/null" in + let cmd = sprintf "ocamlfind query %s 1>%s 2>%s" pkgs null null in let res = Sys.command cmd = 0 in if verbose then printf "Checking %s(findlib: %s): %s\n%!"