diff options
-rw-r--r-- | utils/ccomp.ml | 16 | ||||
-rw-r--r-- | utils/ccomp.mli | 1 | ||||
-rw-r--r-- | utils/clflags.ml | 1 | ||||
-rw-r--r-- | utils/config.mlp | 12 |
4 files changed, 20 insertions, 10 deletions
diff --git a/utils/ccomp.ml b/utils/ccomp.ml index 90681670a..3ffd92cdf 100644 --- a/utils/ccomp.ml +++ b/utils/ccomp.ml @@ -13,8 +13,16 @@ (* Compiling C files and building C libraries *) +let command cmdline = + if !Clflags.verbose then begin + prerr_string "+ "; + prerr_string cmdline; + prerr_newline() + end; + Sys.command cmdline + let compile_file name = - Sys.command + command (Printf.sprintf "%s -c %s %s -I%s %s" Config.bytecomp_c_compiler @@ -29,12 +37,12 @@ let create_archive archive file_list = Misc.remove_file archive; match Config.system with "win32" -> - Sys.command(Printf.sprintf "lib /nologo /debugtype:cv /out:%s %s" + command(Printf.sprintf "lib /nologo /debugtype:cv /out:%s %s" archive (String.concat " " file_list)) | _ -> let r1 = - Sys.command(Printf.sprintf "ar rc %s %s" + command(Printf.sprintf "ar rc %s %s" archive (String.concat " " file_list)) in if r1 <> 0 or String.length Config.ranlib = 0 then r1 - else Sys.command(Config.ranlib ^ " " ^ archive) + else command(Config.ranlib ^ " " ^ archive) diff --git a/utils/ccomp.mli b/utils/ccomp.mli index c0eb6f6a4..17aae2a66 100644 --- a/utils/ccomp.mli +++ b/utils/ccomp.mli @@ -13,5 +13,6 @@ (* Compiling C files and building C libraries *) +val command: string -> int val compile_file: string -> int val create_archive: string -> string list -> int diff --git a/utils/clflags.ml b/utils/clflags.ml index bcc7caa2e..f2b55a937 100644 --- a/utils/clflags.ml +++ b/utils/clflags.ml @@ -33,6 +33,7 @@ and nopervasives = ref false (* -nopervasives *) and preprocessor = ref(None : string option) (* -pp *) and thread_safe = ref false (* -thread *) and noassert = ref false (* -noassert *) +and verbose = ref false (* -verbose *) let dump_rawlambda = ref false (* -drawlambda *) and dump_lambda = ref false (* -dlambda *) diff --git a/utils/config.mlp b/utils/config.mlp index a32aec7ba..9442f8dc6 100644 --- a/utils/config.mlp +++ b/utils/config.mlp @@ -11,7 +11,7 @@ (* $Id$ *) -let version = "1.06-1/5" +let version = "1.06-1/6" let standard_library = try @@ -26,11 +26,11 @@ let c_libraries = "%%CCLIBS%%" let ranlib = "%%RANLIBCMD%%" let exec_magic_number = "Caml1999X001" -and cmi_magic_number = "Caml1999I002" -and cmo_magic_number = "Caml1999O003" -and cma_magic_number = "Caml1999A003" -and cmx_magic_number = "Caml1999Y004" -and cmxa_magic_number = "Caml1999Z004" +and cmi_magic_number = "Caml1999I003" +and cmo_magic_number = "Caml1999O004" +and cma_magic_number = "Caml1999A004" +and cmx_magic_number = "Caml1999Y005" +and cmxa_magic_number = "Caml1999Z005" and ast_impl_magic_number = "Caml1999M003" and ast_intf_magic_number = "Caml1999N003" |