diff -ru menhir-20070322/infer.ml menhir-20070322.patched/infer.ml --- menhir-20070322/infer.ml 2007-03-22 21:12:49.000000000 +0100 +++ menhir-20070322.patched/infer.ml 2007-05-14 18:07:02.000000000 +0200 @@ -332,9 +332,12 @@ (* Invoke ocamlc to do type inference for us. *) let output = + let incl_dirs = + String.concat " " (List.map (fun s -> "-I " ^ s) Settings.incl_dirs) + in IO.winvoke [ write grammar ] - (Printf.sprintf "%s -c -i %s" Settings.ocamlc (Filename.quote mlname)) + (Printf.sprintf "%s %s -c -i %s" Settings.ocamlc incl_dirs (Filename.quote mlname)) [ remove mlname ] in diff -ru menhir-20070322/settings.ml menhir-20070322.patched/settings.ml --- menhir-20070322/settings.ml 2007-03-22 21:12:49.000000000 +0100 +++ menhir-20070322.patched/settings.ml 2007-05-14 18:50:58.000000000 +0200 @@ -93,6 +93,9 @@ let ocamldep = ref "ocamldep" +let incl_dirs = + ref [] + let logG, logA, logC = ref 0, ref 0, ref 0 @@ -131,6 +134,7 @@ "--no-stdlib", Arg.Set no_stdlib, " Do not load the standard library"; "--ocamlc", Arg.Set_string ocamlc, " Specifies how ocamlc should be invoked"; "--ocamldep", Arg.Set_string ocamldep, " Specifies how ocamldep should be invoked"; + "-I", Arg.String (fun s -> incl_dirs := s :: !incl_dirs), " Add to the list of include directories"; "--only-preprocess", Arg.Set preprocess_only, " Print a simplified grammar and exit"; "--only-tokens", Arg.Unit tokentypeonly, " Generate token type definition only, no code"; "--raw-depend", Arg.Unit (fun () -> depend := OMRaw), " Invoke ocamldep and echo its raw output"; @@ -237,6 +241,9 @@ let ocamldep = !ocamldep +let incl_dirs = + !incl_dirs + let logG, logA, logC = !logG, !logA, !logC diff -ru menhir-20070322/settings.mli menhir-20070322.patched/settings.mli --- menhir-20070322/settings.mli 2007-03-22 21:12:50.000000000 +0100 +++ menhir-20070322.patched/settings.mli 2007-05-14 18:05:47.000000000 +0200 @@ -97,6 +97,7 @@ val ocamlc: string val ocamldep: string +val incl_dirs: string list (* How verbose we should be. *)