Permalink
Browse files

On FreeBSD, use md5, use md5sum elsewhere

  • Loading branch information...
1 parent 1321ba9 commit 39997a8c859b0918b20844f5575519a858de1991 @fperrin fperrin committed Sep 25, 2011
Showing with 4 additions and 2 deletions.
  1. +3 −1 build/myocamlbuild_prefix.ml
  2. +1 −1 build_rules.ml
@@ -26,8 +26,10 @@ open Command
let mlstate_platform = "mlstate_platform"
let is_mac = Config.os = Config.Mac
+let is_fbsd = Config.os = Config.FreeBSD
-let sed = if is_mac then P"gsed" else P"sed"
+let sed = if is_mac then P"gsed" else P"sed"
+let md5 = if is_fbsd then P"md5" else P"md5sum"
(**
tools for which we call the windows version (and that need some call translation)
View
@@ -241,7 +241,7 @@ rule "opa parser version: opalang/syntax/* stdlib -> opalang/syntax/opaParserVer
let files = List.map (fun s-> P s) parser_files in
Seq[
Cmd(S ( [Sh"echo let hash = \\\" > "; P (opaParserVersion)]));
- Cmd(S ( [Sh"cat"] @ files @ [Sh"|";Sh"md5sum";Sh">>";P opaParserVersion]));
+ Cmd(S ( [Sh"cat"] @ files @ [Sh"|"; md5; Sh">>"; P opaParserVersion]));
Cmd(S ( [Sh"echo \\\" >>"; P opaParserVersion ] ))
]
);

1 comment on commit 39997a8

Contributor

alokmenghrajani commented on 39997a8 Oct 25, 2011

You need md5 for mac os too. I tried to build on mac os x (10.8), and things failed because of this.

Please sign in to comment.