Commit 5b821745 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-10-13 20:21:54 by cvscast] Remove -o; add -I --obj-dir; error messages

Original author: cvscast
Date: 2003-10-13 20:21:54+00:00
parent 7088b4f3
...@@ -145,7 +145,7 @@ let rec print_exn ppf = function ...@@ -145,7 +145,7 @@ let rec print_exn ppf = function
Format.fprintf ppf "Source filename must have extension .cd@."; Format.fprintf ppf "Source filename must have extension .cd@.";
| InvalidObjectFilename f -> | InvalidObjectFilename f ->
Format.fprintf ppf "Compilation error:@."; Format.fprintf ppf "Compilation error:@.";
Format.fprintf ppf "Object filename must have extension .cdo@."; Format.fprintf ppf "Object filename must have extension .cdo and no path@.";
| Librarian.InvalidObject f -> | Librarian.InvalidObject f ->
Format.fprintf ppf "Invalid object file %s@." f Format.fprintf ppf "Invalid object file %s@." f
| Librarian.CannotOpen f -> | Librarian.CannotOpen f ->
...@@ -360,7 +360,7 @@ let compile_run src argv = ...@@ -360,7 +360,7 @@ let compile_run src argv =
let run obj argv = let run obj argv =
try try
if not (Filename.check_suffix obj ".cdo") if not (Filename.check_suffix obj ".cdo") || (Filename.basename obj <> obj)
then raise (InvalidObjectFilename obj); then raise (InvalidObjectFilename obj);
let cu = Filename.chop_suffix (Filename.basename obj) ".cdo" in let cu = Filename.chop_suffix (Filename.basename obj) ".cdo" in
let id = Types.CompUnit.mk (U.mk_latin1 cu) in let id = Types.CompUnit.mk (U.mk_latin1 cu) in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment