Get rid of the -ocamlc arg altogether
This commit is contained in:
parent
86e4df847b
commit
75bc824f97
|
@ -422,22 +422,15 @@ let main ?(args=[]) ~name f =
|
||||||
let ocamlc = ref (
|
let ocamlc = ref (
|
||||||
match Sys.getenv "DUNE_CONFIGURATOR" with
|
match Sys.getenv "DUNE_CONFIGURATOR" with
|
||||||
| s -> Some s
|
| 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 verbose = ref false in
|
||||||
let dest_dir = ref None in
|
let dest_dir = ref None in
|
||||||
let args =
|
let args =
|
||||||
Arg.align
|
Arg.align
|
||||||
([ "-ocamlc", Arg.String (fun s ->
|
([ "-verbose", Arg.Set verbose,
|
||||||
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,
|
|
||||||
" be verbose"
|
" be verbose"
|
||||||
; "-dest-dir", Arg.String (fun s -> dest_dir := Some s),
|
; "-dest-dir", Arg.String (fun s -> dest_dir := Some s),
|
||||||
"DIR save temporary files to this directory"
|
"DIR save temporary files to this directory"
|
||||||
|
|
Loading…
Reference in New Issue