Commits

Anonymous committed 3617cef

fix PR#5763: ocamlbuild does not give correct flags when running menhir

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12946f963ae5c-01c2-4b8c-9fe0-0dff7051ff02

Comments (0)

Files changed (2)

 - PR#5738: first class module patterns not handled by ocamldep
 - PR#5747: 'unused open' warning not given when compiling with -annot
 - PR#5758: Compiler bug when matching on floats
+- PR#5763: ocamlbuild does not give correct flags when running menhir
 
 Internals:
 - Moved debugger/envaux.ml to typing/envaux.ml to publish env_of_only_summary

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