From c5bf086511ed4830018e67ca63df86045dbe356d Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Wed, 25 Oct 2023 14:25:21 -0700 Subject: [PATCH] build: link dune executables for gen_curry and gen_caml_oo_curry (#833) --- jscomp/runtime/dune | 6 ++---- jscomp/runtime/gen/dune | 2 ++ .../gen/{caml_oo_curry_gen.ml => gen_caml_oo_curry.ml} | 2 +- jscomp/runtime/gen/{curry_gen.ml => gen_curry.ml} | 0 4 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 jscomp/runtime/gen/dune rename jscomp/runtime/gen/{caml_oo_curry_gen.ml => gen_caml_oo_curry.ml} (96%) rename jscomp/runtime/gen/{curry_gen.ml => gen_curry.ml} (100%) diff --git a/jscomp/runtime/dune b/jscomp/runtime/dune index 7cdf1e2cdc..a294fda4a7 100644 --- a/jscomp/runtime/dune +++ b/jscomp/runtime/dune @@ -33,16 +33,14 @@ (rule (target caml_oo_curry.ml) - (deps gen/caml_oo_curry_gen.ml) (action (with-stdout-to %{target} - (run ocaml %{deps})))) + (run ./gen/gen_caml_oo_curry.exe)))) (rule (target curry.ml) - (deps gen/curry_gen.ml) (action (with-stdout-to %{target} - (run ocaml %{deps})))) + (run ./gen/gen_curry.exe)))) diff --git a/jscomp/runtime/gen/dune b/jscomp/runtime/gen/dune new file mode 100644 index 0000000000..9ea2f53e73 --- /dev/null +++ b/jscomp/runtime/gen/dune @@ -0,0 +1,2 @@ +(executables + (names gen_caml_oo_curry gen_curry)) diff --git a/jscomp/runtime/gen/caml_oo_curry_gen.ml b/jscomp/runtime/gen/gen_caml_oo_curry.ml similarity index 96% rename from jscomp/runtime/gen/caml_oo_curry_gen.ml rename to jscomp/runtime/gen/gen_caml_oo_curry.ml index 0b49b47e53..fbc60c4715 100644 --- a/jscomp/runtime/gen/caml_oo_curry_gen.ml +++ b/jscomp/runtime/gen/gen_caml_oo_curry.ml @@ -55,7 +55,7 @@ let js%d label cacheid %s = let () = print_endline @@ Printf.sprintf "%s\n%s" prelude - (String.concat "\n" (list_init 8 (fun i -> generate_fun (i + 1)))) + (String.concat "\n" (list_init number (fun i -> generate_fun (i + 1)))) (* local variables: *) (* compile-command: "ocaml caml_oo_curry_gen.ml > ../jscomp/runtime/caml_oo_curry.ml" *) diff --git a/jscomp/runtime/gen/curry_gen.ml b/jscomp/runtime/gen/gen_curry.ml similarity index 100% rename from jscomp/runtime/gen/curry_gen.ml rename to jscomp/runtime/gen/gen_curry.ml