From 326a8a7c5a6a8fdf64aa6e800788f0f4cbe65ceb Mon Sep 17 00:00:00 2001 From: Gabriel Kerneis Date: Thu, 7 Nov 2013 18:29:35 +0000 Subject: Port L2 to new Lem Tests compile and run properly. There is a lot of hackery going on to workaround the rough edges of new Lem. Use at your own risk (you need the "library-format" branch of lem). --- src/myocamlbuild.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/myocamlbuild.ml') diff --git a/src/myocamlbuild.ml b/src/myocamlbuild.ml index fae690db..efb87821 100644 --- a/src/myocamlbuild.ml +++ b/src/myocamlbuild.ml @@ -17,6 +17,9 @@ let lem_deps = List.map ((/) "lem_interp") [ ] ;; let lem_opts = List.fold_right (fun s l -> [A "-i"; P s] @ l) lem_deps [] ;; +(* New library magic: *) +let lem_opts = [A "-lib"; P "../lem_interp"] ;; + dispatch begin function | After_rules -> (* ocaml_lib "lem_interp/interp"; *) @@ -24,10 +27,11 @@ dispatch begin function rule "lem -> ml" ~prod: "%.ml" - ~deps: ("%.lem" :: lem_deps) + ~dep: "%.lem" (fun env builder -> Seq [ Cmd (S ([ P lem] @ lem_opts @ [ A "-ocaml"; P (env "%.lem") ])); - mv (basename (env "%.ml")) (dirname (env "%.ml")) + (* XXX should be unnecessary with new lem + * mv (basename (env "%.ml")) (dirname (env "%.ml")) *) ]); rule "sail -> lem" -- cgit v1.2.3