summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Pouillard <np@nicolaspouillard.fr>2007-11-28 16:06:13 +0000
committerNicolas Pouillard <np@nicolaspouillard.fr>2007-11-28 16:06:13 +0000
commit68072dfe87e26264b47d696065659e1bf0ffbab3 (patch)
tree9d2419f5921ff54187b4cbf676d2b5b1dcd604cf
parentf835cca505040b1428d043b8df89c28875649e9f (diff)
[ocamlbuild] Implement default tags in a simpler way.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8666 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--ocamlbuild/main.ml3
-rw-r--r--ocamlbuild/tools.ml4
-rw-r--r--ocamlbuild/tools.mli1
3 files changed, 3 insertions, 5 deletions
diff --git a/ocamlbuild/main.ml b/ocamlbuild/main.ml
index cd6ce1c84..501411c47 100644
--- a/ocamlbuild/main.ml
+++ b/ocamlbuild/main.ml
@@ -60,7 +60,6 @@ let proceed () =
Options.init ();
if !Options.must_clean then clean ();
Hooks.call_hook Hooks.After_options;
- Tools.default_tags := Tags.of_list !Options.tags;
Plugin.execute_plugin_if_needed ();
if !Options.targets = []
@@ -83,6 +82,8 @@ let proceed () =
<**/*.cmx>: ocaml, native
";
+ Configuration.tag_any !Options.tags;
+
let newpwd = Sys.getcwd () in
Sys.chdir Pathname.pwd;
let entry_include_dirs = ref [] in
diff --git a/ocamlbuild/tools.ml b/ocamlbuild/tools.ml
index e2211e873..dfbc4ba4f 100644
--- a/ocamlbuild/tools.ml
+++ b/ocamlbuild/tools.ml
@@ -22,10 +22,8 @@ open Rule
let pp_l = List.print String.print
-let default_tags = ref Tags.empty;;
-
let tags_of_pathname p =
- (Tags.union (Configuration.tags_of_filename (Pathname.to_string p)) !default_tags)
+ Configuration.tags_of_filename (Pathname.to_string p)
++("file:"^p)
++("extension:"^Pathname.get_extension p)
let flags_of_pathname p = Configuration.flags_of_filename (Pathname.to_string p)
diff --git a/ocamlbuild/tools.mli b/ocamlbuild/tools.mli
index de1f0d3d8..1d3dc13d8 100644
--- a/ocamlbuild/tools.mli
+++ b/ocamlbuild/tools.mli
@@ -15,6 +15,5 @@
val tags_of_pathname : Pathname.t -> Tags.t
val flags_of_pathname : Pathname.t -> Command.spec
-val default_tags : Tags.t ref
val path_and_context_of_string : Pathname.t -> Pathname.t list
val pp_l : Format.formatter -> string list -> unit