Skip to content

Commit

Permalink
[ocamlbuild] Add the -tag_line option
Browse files Browse the repository at this point in the history
git-svn-id: http://caml.inria.fr/svn/ocaml/version/3.10@8186 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information
pouillar committed Apr 12, 2007
1 parent 51dfd83 commit 8a2b61a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ocamlbuild/main.ml
Expand Up @@ -134,6 +134,8 @@ let proceed () =
dprintf 3 "include directories are:@ %a" print_string_list !Options.include_dirs;
Options.entry := Some entry;

List.iter Configuration.parse_string !Options.tag_lines;

Hooks.call_hook Hooks.Before_rules;
Ocaml_specific.init ();
Hooks.call_hook Hooks.After_rules;
Expand Down
4 changes: 4 additions & 0 deletions ocamlbuild/options.ml
Expand Up @@ -89,6 +89,7 @@ let ocaml_lexflags_internal = ref []
let program_args_internal = ref []
let ignore_list_internal = ref []
let tags_internal = ref [["quiet"]]
let tag_lines_internal = ref []
let show_tags_internal = ref []

let my_include_dirs = ref [[Filename.current_dir_name]]
Expand Down Expand Up @@ -150,6 +151,7 @@ let spec =
"-pp", String (add_to ocaml_ppflags_internal), "<flag,...> (idem)";
"-tag", String (add_to' tags_internal), "<tag> Add to default tags";
"-tags", String (add_to tags_internal), "<tag,...> (idem)";
"-tag-line", String (add_to' tag_lines_internal), "<tag> Use this line of tags (as in _tags)";
"-show-tags", String (add_to' show_tags_internal), "<path> Show tags that applies on that pathname";

"-ignore", String (add_to ignore_list_internal), "<module,...> Don't try to build these modules";
Expand Down Expand Up @@ -199,6 +201,7 @@ let ocaml_lexflags = ref []
let program_args = ref []
let ignore_list = ref []
let tags = ref []
let tag_lines = ref []
let show_tags = ref []

let init () =
Expand All @@ -217,6 +220,7 @@ let init () =
reorder ocaml_lexflags ocaml_lexflags_internal;
reorder program_args program_args_internal;
reorder tags tags_internal;
reorder tag_lines tag_lines_internal;
reorder ignore_list ignore_list_internal;
reorder show_tags show_tags_internal;

Expand Down
1 change: 1 addition & 0 deletions ocamlbuild/signatures.mli
Expand Up @@ -372,6 +372,7 @@ module type OPTIONS = sig
val program_args : string list ref
val ignore_list : string list ref
val tags : string list ref
val tag_lines : string list ref
val show_tags : string list ref

val ext_obj : string ref
Expand Down

0 comments on commit 8a2b61a

Please sign in to comment.