Bug#876478: ben tracker --global-conf <path> ignores settings
On 2018-05-14 08:01, Sebastiaan Couwenberg wrote:
Unfortunately that doesn't apply cleanly on top of 0.7.4 for stretch.
If
you can provide a rebased commit for 0.7.4 I'm willing to test that.
No problem. Here it is (attached). Thanks for your tests!
Kind Regards,
--
Mehdi
--- a/_tags
+++ b/_tags
@@ -2,4 +2,4 @@
<**/*.ml*>: annot
<lib/benlib/*.cmx>: for-pack(Benlib)
<lib/benl.cm{x,}a>: use_libbenl
-<**/*.{byte,native}>: use_libbenl
+<bin/*.{byte,native}>: use_libbenl
--- a/myocamlbuild.ml
+++ b/myocamlbuild.ml
@@ -96,6 +96,18 @@ let () =
flag ["ocaml"; "compile"; "native"] (S[A"-inline"; A"1000"]);
flag ["ocaml"; "link"; "native"] (S[A"-inline"; A"1000"]);
+ (* Templates *)
+ rule "template: cmx -> cmxs"
+ ~prod:"%.cmxs"
+ ~dep:"%.cmx"
+ ~insert:`top
+ ~doc:"This rule allows to build a .cmxs from a .cmx, without including all its dependencies." begin
+ fun env _ ->
+ let cmx = env "%.cmx" in
+ let cmxs = env "%.cmxs" in
+ Cmd(S[!Options.ocamlopt; A "-shared"; A "-I"; A "templates"; A cmx; A "-o"; A cmxs])
+ end;
+
(* why isn't this done by default? *)
flag ["library"; "link"; "thread"] (A"-thread");
Reply to: