Source

ocaml / ocamlbuild / ocaml_tools.ml

Diff from to

ocamlbuild/ocaml_tools.ml

 let menhir mly env build =
   let mly = env mly in
   let menhir = if !Options.ocamlyacc = N then V"MENHIR" else !Options.ocamlyacc in
+  let tags = tags_of_pathname mly in
+  let ocamlc_tags = tags++"ocaml"++"byte"++"compile" in
+  let menhir_tags = tags++"ocaml"++"parser"++"menhir" in
   Ocaml_compiler.prepare_compile build mly;
   Cmd(S[menhir;
-        A"--ocamlc"; Quote(S[!Options.ocamlc; ocaml_include_flags mly]);
-        T(tags_of_pathname mly++"ocaml"++"parser"++"menhir");
-        A"--infer"; Px mly])
+        A"--ocamlc"; Quote(S[!Options.ocamlc; T ocamlc_tags; ocaml_include_flags mly]);
+        T menhir_tags; A"--infer"; Px mly])
 
 let ocamldoc_c tags arg odoc =
   let tags = tags++"ocaml" in