let menhir_modular menhir_base mlypack mlypack_depends env build =
let menhir = if !Options.ocamlyacc = N then V"MENHIR" else !Options.ocamlyacc in
let menhir_base = env menhir_base in
let mlypack = env mlypack in
let mlypack_depends = env mlypack_depends in
let (tags,files) = import_mlypack build mlypack in
let () = List.iter Outcome.ignore_good (build [[mlypack_depends]]) in
Ocaml_compiler.prepare_compile build mlypack;
let ocamlc_tags = tags++"ocaml"++"byte"++"compile" in
let tags = tags++"ocaml"++"parser"++"menhir" in
Cmd(S[menhir ;
A "--ocamlc"; Quote(S[!Options.ocamlc; T ocamlc_tags; ocaml_include_flags mlypack]);
T tags ; A "--infer" ; A "--base" ; Px menhir_base ; atomize_paths files])