From db3122769db8418fd4575118da082669d31a543b Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Tue, 4 Aug 2020 12:38:54 +0200 Subject: [PATCH 1/2] Fix esy installation --- digestif.opam | 2 +- install/install.ml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/digestif.opam b/digestif.opam index 2add508..917b788 100644 --- a/digestif.opam +++ b/digestif.opam @@ -50,7 +50,7 @@ depends: [ "astring" {with-test} "fpath" {with-test} "rresult" {with-test} - "ocamlfind" {build & with-test} + "ocamlfind" {with-test} ] depopts: [ diff --git a/install/install.ml b/install/install.ml index 40e515e..53f1210 100755 --- a/install/install.ml +++ b/install/install.ml @@ -1,10 +1,7 @@ #!/usr/bin/env ocaml ;; -#use "topfind" - -;; -#require "unix" +#load "unix.cma" let xen = "xen_linkopts = \"-l:rakia/xen/librakia_xen_stubs.a\"" @@ -12,7 +9,10 @@ let freestanding = "freestanding_linkopts = \ \"-l:rakia/freestanding/librakia_freestanding_stubs.a\"" -let meta = "_build/default/META.digestif" +let meta = + match Sys.getenv_opt "DUNE_BUILD_DIR" with + | Some _build -> _build ^ "/default/META.digestif" + | None -> "_build/default/META.digestif" let new_line = '\n' From f1c9c70aae3f034a6bcbc476d26ce9eaadd5b963 Mon Sep 17 00:00:00 2001 From: Calascibetta Romain Date: Tue, 4 Aug 2020 14:11:50 +0200 Subject: [PATCH 2/2] Use Sys.getenv instead Sys.getenv_opt --- install/install.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/install.ml b/install/install.ml index 53f1210..6d316f7 100755 --- a/install/install.ml +++ b/install/install.ml @@ -10,9 +10,9 @@ let freestanding = \"-l:rakia/freestanding/librakia_freestanding_stubs.a\"" let meta = - match Sys.getenv_opt "DUNE_BUILD_DIR" with - | Some _build -> _build ^ "/default/META.digestif" - | None -> "_build/default/META.digestif" + match Sys.getenv "DUNE_BUILD_DIR" with + | _build -> _build ^ "/default/META.digestif" + | exception Not_found -> "_build/default/META.digestif" let new_line = '\n'