Implement -syntax ocamlfind flag for ocamlbuild

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13262 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Wojciech Meyer 2013-01-19 10:44:19 +00:00
parent e82f05c3ef
commit 37bbb9bb16
3 changed files with 7 additions and 0 deletions

View File

@ -98,6 +98,10 @@ let proceed () =
(fun pkg -> Configuration.tag_any [Param_tags.make "package" pkg])
!Options.ocaml_pkgs;
begin match !Options.ocaml_syntax with
| Some syntax -> Configuration.tag_any [Param_tags.make "syntax" syntax]
| None -> () end;
let newpwd = Sys.getcwd () in
Sys.chdir Pathname.pwd;
let entry_include_dirs = ref [] in

View File

@ -106,6 +106,7 @@ let targets_internal = ref []
let ocaml_libs_internal = ref []
let ocaml_mods_internal = ref []
let ocaml_pkgs_internal = ref []
let ocaml_syntax = ref None
let ocaml_lflags_internal = ref []
let ocaml_cflags_internal = ref []
let ocaml_docflags_internal = ref []
@ -178,6 +179,7 @@ let spec = ref (
"-pkg", String (add_to' ocaml_pkgs_internal), "<package> Link to this ocaml findlib package";
"-pkgs", String (add_to ocaml_pkgs_internal), "<package,...> (idem)";
"-package", String (add_to' ocaml_pkgs_internal), "<package> (idem)";
"-syntax", String (fun syntax -> ocaml_syntax := Some syntax), "<syntax> Specify syntax using ocamlfind";
"-lflag", String (add_to' ocaml_lflags_internal), "<flag> Add to ocamlc link flags";
"-lflags", String (add_to ocaml_lflags_internal), "<flag,...> (idem)";
"-cflag", String (add_to' ocaml_cflags_internal), "<flag> Add to ocamlc compile flags";

View File

@ -391,6 +391,7 @@ module type OPTIONS = sig
val ocaml_libs : string list ref
val ocaml_mods : string list ref
val ocaml_pkgs : string list ref
val ocaml_syntax : string option ref
val ocaml_cflags : string list ref
val ocaml_lflags : string list ref
val ocaml_ppflags : string list ref