Browse files

Revert "PR#5652: Try to use camlp4.opt if it's possible"

camlp4.opt works only with native plugins therefore the fix will break bytecode camlp4 plugins.

git-svn-id: f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information...
1 parent 4fd0775 commit 98f51590fce900e98ec0427f252b37eed2854ae5 meyer committed Dec 28, 2012
Showing with 4 additions and 10 deletions.
  1. +4 −10 ocamlbuild/
14 ocamlbuild/
@@ -478,26 +478,20 @@ let () =
pflag ["ocaml";"compile";] "warn"
(fun param -> S [A "-w"; A param])
-let try_opt name =
- let cmd = Command.string_of_command_spec (A name)in
- try ignore(Command.search_in_path cmd); name ^ ".opt"
- with Not_found -> name
let camlp4_flags camlp4s =
List.iter begin fun camlp4 ->
- flag ["ocaml"; "pp"; camlp4] (A (try_opt camlp4))
+ flag ["ocaml"; "pp"; camlp4] (A camlp4)
end camlp4s;;
camlp4_flags ["camlp4o"; "camlp4r"; "camlp4of"; "camlp4rf"; "camlp4orf"; "camlp4oof"];;
let camlp4_flags' camlp4s =
- List.iter begin fun (camlp4, cmd, flags) ->
- let flags = S (A (try_opt cmd) :: flags) in
+ List.iter begin fun (camlp4, flags) ->
flag ["ocaml"; "pp"; camlp4] flags
end camlp4s;;
-camlp4_flags' ["camlp4orr", "camlp4of", [A"-parser"; A"reloaded"];
- "camlp4rrr", "camlp4rf", [A"-parser"; A"reloaded"]];;
+camlp4_flags' ["camlp4orr", S[A"camlp4of"; A"-parser"; A"reloaded"];
+ "camlp4rrr", S[A"camlp4rf"; A"-parser"; A"reloaded"]];;
flag ["ocaml"; "pp"; "camlp4:no_quot"] (A"-no_quot");;

0 comments on commit 98f5159

Please sign in to comment.