Skip to content

Commit

Permalink
Fix build process on Windows
Browse files Browse the repository at this point in the history
ocamlbuild makes things quite hard for itself by invoking bash via
Sys.command and so needing to worry about both bash escaping *and* cmd
escaping.

Patch allows camlp4 to build even while this isn't working properly -
change has no effect on Unix and will continue to work even once
ocamlbuild itself is fixed.
  • Loading branch information
dra27 committed Jun 24, 2015
1 parent 31182c3 commit ae24ba5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion myocamlbuild.ml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,14 @@ let () =
let dep = "camlp4"/"boot"/exe in
let cmd =
let ( / ) = Filename.concat in
"camlp4"/"boot"/exe
(*
* Workaround ocamlbuild problems on Windows by double-escaping.
* On systems using forward-slash, the calls to String.escaped will be
* no-ops anyway and the code will continue to work even once ocamlbuild
* correctly escapes output (the issue is trying to escape output for both cmd
* and bash)
*)
String.escaped (String.escaped ("camlp4"/"boot"/exe))
in
(Some dep, cmd)
in
Expand Down

0 comments on commit ae24ba5

Please sign in to comment.