Skip to content

Commit

Permalink
Fix shell expansion II / NUL
Browse files Browse the repository at this point in the history
  • Loading branch information
fdopen committed Nov 5, 2016
1 parent 6c87148 commit 84179f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
3 changes: 2 additions & 1 deletion discover.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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%!"
Expand Down

0 comments on commit 84179f7

Please sign in to comment.