diff options
| author | Nicolas Pouillard <np@nicolaspouillard.fr> | 2007-11-29 10:22:19 +0000 |
|---|---|---|
| committer | Nicolas Pouillard <np@nicolaspouillard.fr> | 2007-11-29 10:22:19 +0000 |
| commit | 4a74506e4c1f80207ac8bbad45f922f39de2fce6 (patch) | |
| tree | 016462ba18ec74310e51736e24a899a4a0098ce2 /myocamlbuild.ml | |
| parent | bd39e6f438f06abcc2b572ecb167b1af9b3105e0 (diff) | |
| download | ocaml-4a74506e4c1f80207ac8bbad45f922f39de2fce6.tar.gz | |
[build] More dependencies for camlp4 binaries rules.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8690 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'myocamlbuild.ml')
| -rw-r--r-- | myocamlbuild.ml | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/myocamlbuild.ml b/myocamlbuild.ml index f50408b5f4..3cd493470f 100644 --- a/myocamlbuild.ml +++ b/myocamlbuild.ml @@ -759,17 +759,18 @@ let mk_camlp4_bin name ?unix:(link_unix=true) modules = let name = "camlp4"/name in let byte = name-.-"byte" in let native = name-.-"native" in - let unix_cma, unix_cmxa, include_unix = - if link_unix then A"unix.cma", A"unix.cmxa", S[A"-I"; P unix_dir] else N,N,N in - let dynlink_cmxa,include_dynlink = - A"dynlink.cmxa", S[A"-I"; P dynlink_dir] - in + let unix_cma, dep_unix_byte, unix_cmxa, dep_unix_native, include_unix = + if link_unix + then A"unix.cma", [unix_dir/"unix.cma"], + A"unix.cmxa", [unix_dir/"unix.cmxa"; unix_dir/"unix"-.-C.a], + S[A"-I"; P unix_dir] + else N,[],N,[],N in let deps = special_modules @ modules @ [camlp4_bin] in let cmos = add_extensions ["cmo"] deps in let cmxs = add_extensions ["cmx"] deps in let objs = add_extensions [C.o] deps in rule byte - ~deps:(camlp4lib_cma::cmos) + ~deps:(camlp4lib_cma::cmos @ dep_unix_byte) ~prod:(add_exe byte) ~insert:(`before "ocaml: cmo* -> byte") begin fun _ _ -> @@ -777,11 +778,11 @@ let mk_camlp4_bin name ?unix:(link_unix=true) modules = P camlp4lib_cma; A"-linkall"; atomize cmos; A"-o"; Px (add_exe byte)]) end; rule native - ~deps:(camlp4lib_cmxa :: camlp4lib_lib :: (cmxs @ objs)) + ~deps:(camlp4lib_cmxa :: camlp4lib_lib :: (cmxs @ objs @ dep_unix_native)) ~prod:(add_exe native) ~insert:(`before "ocaml: cmx* & o* -> native") begin fun _ _ -> - Cmd(S[ocamlopt; include_dynlink; dynlink_cmxa; include_unix; unix_cmxa; T(tags_of_pathname native++"ocaml"++"link"++"native"); + Cmd(S[ocamlopt; include_unix; unix_cmxa; T(tags_of_pathname native++"ocaml"++"link"++"native"); P camlp4lib_cmxa; A"-linkall"; atomize cmxs; A"-o"; Px (add_exe native)]) end;; |
