Ajout option "-intf_suffix" pour spécifier le suffixe de l'interface
quand on compile l'implémentation. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1971 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
0e7a0abdd7
commit
5a5d98b149
|
@ -27,7 +27,7 @@ let process_file name =
|
|||
Compile.implementation name;
|
||||
objfiles := (Filename.chop_extension name ^ ".cmo") :: !objfiles
|
||||
end
|
||||
else if Filename.check_suffix name ".mli" then
|
||||
else if Filename.check_suffix name !Config.interface_suffix then
|
||||
Compile.interface name
|
||||
else if Filename.check_suffix name ".cmo"
|
||||
or Filename.check_suffix name ".cma" then
|
||||
|
@ -63,6 +63,7 @@ module Options = Main_args.Make_options (struct
|
|||
let _I s = include_dirs := s :: !include_dirs
|
||||
let _impl = process_implementation_file
|
||||
let _intf = process_interface_file
|
||||
let _intf_suffix s = Config.interface_suffix := s
|
||||
let _linkall = set link_everything
|
||||
let _make_runtime () =
|
||||
custom_runtime := true; make_runtime := true; link_everything := true
|
||||
|
|
|
@ -23,6 +23,7 @@ module Make_options (F :
|
|||
val _I : string -> unit
|
||||
val _impl : string -> unit
|
||||
val _intf : string -> unit
|
||||
val _intf_suffix : string -> unit
|
||||
val _linkall : unit -> unit
|
||||
val _make_runtime : unit -> unit
|
||||
val _noassert : unit -> unit
|
||||
|
@ -54,6 +55,8 @@ struct
|
|||
"<dir> Add <dir> to the list of include directories";
|
||||
"-impl", Arg.String F._impl, "<file> Compile <file> as a .ml file";
|
||||
"-intf", Arg.String F._intf, "<file> Compile <file> as a .mli file";
|
||||
"-intf_suffix", Arg.String F._intf_suffix,
|
||||
"<file> Suffix for interface file (default: .mli)";
|
||||
"-linkall", Arg.Unit F._linkall, " Link all modules, even unused ones";
|
||||
"-make_runtime", Arg.Unit F._make_runtime,
|
||||
" Build a runtime system with given C objects and libraries";
|
||||
|
|
|
@ -23,6 +23,7 @@ module Make_options (F :
|
|||
val _I : string -> unit
|
||||
val _impl : string -> unit
|
||||
val _intf : string -> unit
|
||||
val _intf_suffix : string -> unit
|
||||
val _linkall : unit -> unit
|
||||
val _make_runtime : unit -> unit
|
||||
val _noassert : unit -> unit
|
||||
|
|
|
@ -27,7 +27,7 @@ let process_file name =
|
|||
Optcompile.implementation name;
|
||||
objfiles := (Filename.chop_extension name ^ ".cmx") :: !objfiles
|
||||
end
|
||||
else if Filename.check_suffix name ".mli" then
|
||||
else if Filename.check_suffix name !Config.interface_suffix then
|
||||
Optcompile.interface name
|
||||
else if Filename.check_suffix name ".cmx"
|
||||
or Filename.check_suffix name ".cmxa" then
|
||||
|
@ -72,6 +72,8 @@ let main () =
|
|||
"<n> Set aggressiveness of inlining to <n>";
|
||||
"-intf", Arg.String process_interface_file,
|
||||
"<file> Compile <file> as a .mli file";
|
||||
"-intf_suffix", Arg.String (fun s -> Config.interface_suffix := s),
|
||||
"<file> Suffix for interface file (default: .mli)";
|
||||
"-linkall", Arg.Set link_everything,
|
||||
" Link all modules, even unused ones";
|
||||
"-noassert", Arg.Set noassert, " Don't compile assertion checks";
|
||||
|
|
|
@ -35,6 +35,9 @@ val ranlib: string
|
|||
val load_path: string list ref
|
||||
(* Directories in the search path for .cmi and .cmo files *)
|
||||
|
||||
val interface_suffix: string ref
|
||||
(* Suffix for interface file names *)
|
||||
|
||||
val exec_magic_number: string
|
||||
(* Magic number for bytecode executable files *)
|
||||
val cmi_magic_number: string
|
||||
|
|
|
@ -37,6 +37,8 @@ and ast_intf_magic_number = "Caml1999N005"
|
|||
|
||||
let load_path = ref ([] : string list)
|
||||
|
||||
let interface_suffix = ref ".mli"
|
||||
|
||||
let max_tag = 248
|
||||
let max_young_wosize = 256
|
||||
|
||||
|
|
Loading…
Reference in New Issue