tools/ocamlmktop.ml: make use of the configured extension of executalbes
Before this commit, the name of the compiler to use (ocamlc or ocamlc.exe) was determined base on the OS type. This commit replaces this by a mere string concatenation of "ocamlc" and the configured extension for executable files. This introduces a dependency of tools/ocamlmktop on the compiler's configuration module.master
parent
758ab7d1a6
commit
c530b74e5e
|
@ -135,8 +135,10 @@ ocamlmklib.cmx : \
|
||||||
ocamlmklibconfig.cmo :
|
ocamlmklibconfig.cmo :
|
||||||
ocamlmklibconfig.cmx :
|
ocamlmklibconfig.cmx :
|
||||||
ocamlmktop.cmo : \
|
ocamlmktop.cmo : \
|
||||||
|
../utils/config.cmi \
|
||||||
../utils/ccomp.cmi
|
../utils/ccomp.cmi
|
||||||
ocamlmktop.cmx : \
|
ocamlmktop.cmx : \
|
||||||
|
../utils/config.cmx \
|
||||||
../utils/ccomp.cmx
|
../utils/ccomp.cmx
|
||||||
ocamloptp.cmo : \
|
ocamloptp.cmo : \
|
||||||
../driver/main_args.cmi
|
../driver/main_args.cmi
|
||||||
|
|
|
@ -20,9 +20,8 @@ let _ =
|
||||||
cmd.exe has special quoting rules (see 'cmd.exe /?' for details).
|
cmd.exe has special quoting rules (see 'cmd.exe /?' for details).
|
||||||
Short version: if the string passed to cmd.exe starts with '"',
|
Short version: if the string passed to cmd.exe starts with '"',
|
||||||
the first and last '"' are removed *)
|
the first and last '"' are removed *)
|
||||||
let ocamlc,extra_quote =
|
let ocamlc = "ocamlc" ^ Config.ext_exe in
|
||||||
if Sys.win32 then "ocamlc.exe","\"" else "ocamlc",""
|
let extra_quote = if Sys.win32 then "\"" else "" in
|
||||||
in
|
|
||||||
let ocamlc = Filename.(quote (concat (dirname ocamlmktop) ocamlc)) in
|
let ocamlc = Filename.(quote (concat (dirname ocamlmktop) ocamlc)) in
|
||||||
let cmdline =
|
let cmdline =
|
||||||
extra_quote ^ ocamlc ^ " -I +compiler-libs -linkall ocamlcommon.cma " ^
|
extra_quote ^ ocamlc ^ " -I +compiler-libs -linkall ocamlcommon.cma " ^
|
||||||
|
|
Loading…
Reference in New Issue