Skip to content

Commit

Permalink
Compile the configuration script
Browse files Browse the repository at this point in the history
This is necessary to work with OCaml 4.07.1+musl+static+flambda which
does not allow to dynamically load libraries in the toplevel.

Fixes #25
  • Loading branch information
Chris00 committed Nov 4, 2018
1 parent 845a1dd commit 9301bc4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
4 changes: 4 additions & 0 deletions config/dune
@@ -0,0 +1,4 @@

(executables
(names pp)
(libraries str unix))
3 changes: 0 additions & 3 deletions pp.ml → config/pp.ml
@@ -1,8 +1,5 @@
(* Generate interfaces for standard IO and Lwt. *)

#load "str.cma";;
#load "unix.cma";;

let ( / ) = Filename.concat

let read_all fname =
Expand Down
4 changes: 2 additions & 2 deletions lwt/dune
Expand Up @@ -8,8 +8,8 @@

(rule
(targets csv_lwt.ml)
(deps ../src/csv.pp.ml ../src/csv_memory.ml ../pp.ml)
(action (chdir %{workspace_root} (run %{bin:ocaml} pp.ml))))
(deps ../src/csv.pp.ml ../src/csv_memory.ml ../config/pp.exe)
(action (chdir %{workspace_root} (run config/pp.exe))))

(rule
(targets csv_utils.ml)
Expand Down
4 changes: 2 additions & 2 deletions src/dune
Expand Up @@ -8,5 +8,5 @@

(rule
(targets csv.ml)
(deps csv.pp.ml csv_memory.ml ../pp.ml)
(action (chdir %{workspace_root} (run %{bin:ocaml} pp.ml))))
(deps csv.pp.ml csv_memory.ml ../config/pp.exe)
(action (chdir %{workspace_root} (run config/pp.exe))))
4 changes: 2 additions & 2 deletions tests/dune
Expand Up @@ -41,5 +41,5 @@

(rule
(targets test.ml test_lwt.ml)
(deps test.pp.ml ../pp.ml)
(action (chdir %{workspace_root} (run %{bin:ocaml} pp.ml))))
(deps test.pp.ml ../config/pp.exe)
(action (chdir %{workspace_root} (run config/pp.exe))))

0 comments on commit 9301bc4

Please sign in to comment.