From 75bc824f97ddc1584978178e569ac0a9d1ce0aef Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Thu, 12 Apr 2018 18:05:40 +0700 Subject: [PATCH] Get rid of the -ocamlc arg altogether --- src/configurator/v1.ml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/configurator/v1.ml b/src/configurator/v1.ml index 7c209e93..154c6f37 100644 --- a/src/configurator/v1.ml +++ b/src/configurator/v1.ml @@ -422,22 +422,15 @@ let main ?(args=[]) ~name f = let ocamlc = ref ( match Sys.getenv "DUNE_CONFIGURATOR" with | s -> Some s - | exception Not_found -> None) in + | exception Not_found -> + die "Configurator scripts must be ran with jbuilder. \ + To manually run a script, use $ jbuilder exec." + ) in let verbose = ref false in let dest_dir = ref None in let args = Arg.align - ([ "-ocamlc", Arg.String (fun s -> - Option.iter !ocamlc ~f:(fun _ -> - Format.eprintf - "ocamlc is already passed through DUNE_CONFIGURATOR. \ - There's no need to pass it manually through -ocamlc.@." - ); - ocamlc := Some s - ), - "PATH ocamlc command to use. \ - This value is set automatically when configurator is invoked by dune." - ; "-verbose", Arg.Set verbose, + ([ "-verbose", Arg.Set verbose, " be verbose" ; "-dest-dir", Arg.String (fun s -> dest_dir := Some s), "DIR save temporary files to this directory"