From 19f5b6a7d467f75b334e769ebe30cf6459c86855 Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Thu, 27 Sep 2018 00:32:04 +0200 Subject: [configure] Don't die if the build sandbox doesn't have the stdlib. Dune calls `./configure` under the build sandbox, which, if the voboot target has not been executed will contain only the OCaml parts of Coq. Thus, we make configure not to die if the `plugins` directory is not present. This makes Dune usable without calling the `voboot` target. --- configure.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ml b/configure.ml index 1b0c592e46..d010b44e54 100644 --- a/configure.ml +++ b/configure.ml @@ -1239,7 +1239,10 @@ let write_configml f = pr "\nlet core_src_dirs = [\n%s]\n" core_src_dirs; pr "\nlet plugins_dirs = [\n"; - let plugins = Sys.readdir "plugins" in + let plugins = + try Sys.readdir "plugins" + with _ -> [||] + in Array.sort compare plugins; Array.iter (fun f -> -- cgit v1.2.3