summaryrefslogtreecommitdiff
path: root/camlp4/build
diff options
context:
space:
mode:
authorNicolas Pouillard <np@nicolaspouillard.fr>2006-08-09 13:55:45 +0000
committerNicolas Pouillard <np@nicolaspouillard.fr>2006-08-09 13:55:45 +0000
commit25bb633580fc54944506a4cc06ad356dfbed4469 (patch)
tree494bc2b0935003fbb3ff8802a9e2432d9ca8246f /camlp4/build
parent3ce90b0c9b58142dd4c0911c97533c6b2afb68f4 (diff)
downloadocaml-25bb633580fc54944506a4cc06ad356dfbed4469.tar.gz
[camlp4] fix a bug in build system
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7555 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'camlp4/build')
-rw-r--r--camlp4/build/YaM.ml17
-rw-r--r--camlp4/build/YaM.mli11
-rw-r--r--camlp4/build/build.ml2
3 files changed, 29 insertions, 1 deletions
diff --git a/camlp4/build/YaM.ml b/camlp4/build/YaM.ml
index 45fa7d7f2e..6f4e36316e 100644
--- a/camlp4/build/YaM.ml
+++ b/camlp4/build/YaM.ml
@@ -347,6 +347,23 @@ let ocaml_IModule ?o ?flags ?byte_flags ?opt_flags ?(impl_flags = "") ?pp ?inclu
~dep_files: (fun f -> if is_cmi f then [mli_n] else [ml_n])
()
+(* Comme ocaml_IModule sauf que la commande de construction n'est pas
+ * appelee et que les fichiers ne sont pas detruit par clean.
+ * en gros compile_cmd ne fait rien et trash = []. *)
+let ocaml_fake_IModule ?o ?flags ?byte_flags ?opt_flags ?(impl_flags = "") ?pp ?includes ?ext_includes n =
+ let n, depc, bytec, optc =
+ ocaml_options ?o ?flags ?byte_flags ?opt_flags ?pp ?includes ?ext_includes n
+ in
+ let ml_n, mli_n, cmo_n, cmi_n, cmx_n = ml n, mli n, cmo n, cmi n, cmx n in
+ let targets = [cmo_n; cmi_n; cmx_n] in
+ generic_unit
+ ~name:n
+ ~sources:[ml_n; mli_n] ~targets ~trash:[] ~objects:(cmx_n, cmo_n)
+ ~dependencies:(fun ~native f -> ocamldepi ~native ~depc ~f ~n)
+ ~compile_cmd:(fun _ -> "", [])
+ ~dep_files: (fun f -> if is_cmi f then [mli_n] else [ml_n])
+ ()
+
(* interface ocaml pure *)
let ocaml_Interface ?o ?flags ?byte_flags ?opt_flags ?pp ?includes ?ext_includes n =
diff --git a/camlp4/build/YaM.mli b/camlp4/build/YaM.mli
index 1381291ff8..862e1f6571 100644
--- a/camlp4/build/YaM.mli
+++ b/camlp4/build/YaM.mli
@@ -172,6 +172,17 @@ val generic_ocaml_Module_extension:
string -> unit_t
(** Creates a compilation unit for a single, non interfaced OCaml module. *)
+val ocaml_fake_IModule:
+ ?o: options_t ->
+ ?flags: string -> ?byte_flags: string -> ?opt_flags: string ->
+ ?impl_flags: string ->
+ ?pp: string -> ?includes: string list -> ?ext_includes: string list ->
+ string -> unit_t
+(** Creates a fake compilation unit for an OCaml module, with its interface.
+ Comme ocaml_IModule sauf que la commande de construction n'est pas
+ appelee et que les fichiers ne sont pas detruit par clean.
+ en gros compile_cmd ne fait rien et trash = []. *)
+
val phony_unit: ?depends: string list -> ?command: string -> string -> unit_t
(** creates a phony unit which depends on [depends], and is built with [command]. *)
diff --git a/camlp4/build/build.ml b/camlp4/build/build.ml
index 6937c20764..244991e9ab 100644
--- a/camlp4/build/build.ml
+++ b/camlp4/build/build.ml
@@ -16,7 +16,7 @@ let yam = ocamlrun ^ " ./yam "
let opt = false
(* Arguments to YaM *)
-let yam_args = ""
+let yam_args = "-verbosity " ^ (try Sys.getenv "VERBOSE" with Not_found -> "0")
(* ------------------------------------------------- *)