56 lines
1.7 KiB
Diff
56 lines
1.7 KiB
Diff
--- setup.ml 2011-03-22 17:00:48.000000000 +0100
|
|
+++ setup.ml 2011-12-22 21:41:25.000000000 +0100
|
|
@@ -2662,10 +2662,14 @@
|
|
(ocamlc_config_map ())
|
|
0
|
|
in
|
|
- let nm_config =
|
|
+ let chop_version_suffix s =
|
|
+ try String.sub s 0 (String.index s '+')
|
|
+ with _ -> s
|
|
+ in
|
|
+ let nm_config, value_config =
|
|
match nm with
|
|
- | "ocaml_version" -> "version"
|
|
- | _ -> nm
|
|
+ | "ocaml_version" -> "version", chop_version_suffix
|
|
+ | _ -> nm, (fun x -> x)
|
|
in
|
|
var_redefine
|
|
nm
|
|
@@ -2677,7 +2681,7 @@
|
|
let value =
|
|
SMap.find nm_config map
|
|
in
|
|
- value
|
|
+ value_config value
|
|
with Not_found ->
|
|
failwithf2
|
|
(f_ "Cannot find field '%s' in '%s -config' output")
|
|
@@ -3057,7 +3061,7 @@
|
|
begin
|
|
let acc =
|
|
try
|
|
- Scanf.bscanf scbuf "%S %S@\n"
|
|
+ Scanf.bscanf scbuf "%S %S\n"
|
|
(fun e d ->
|
|
let t =
|
|
e, d
|
|
--- setup.ml.orig 2012-03-17 11:50:20.000000000 +0100
|
|
+++ setup.ml 2012-07-31 17:45:43.000000000 +0200
|
|
@@ -2284,7 +2284,13 @@
|
|
let cmdline =
|
|
String.concat " " (cmd :: args)
|
|
in
|
|
- info (f_ "Running command '%s'") cmdline;
|
|
+ let printable_cmdline =
|
|
+ match List.rev args with
|
|
+ | _ :: (">" | "2>") :: rest ->
|
|
+ String.concat " " (cmd :: List.rev ("[file]" :: ">" :: rest))
|
|
+ | _ -> cmdline
|
|
+ in
|
|
+ info (f_ "Running command '%s'") printable_cmdline;
|
|
match f_exit_code, Sys.command cmdline with
|
|
| None, 0 -> ()
|
|
| None, i ->
|