diff options
author | Samuel Mimram <samuel.mimram@ens-lyon.org> | 2005-01-31 14:34:14 +0000 |
---|---|---|
committer | Samuel Mimram <samuel.mimram@ens-lyon.org> | 2005-01-31 14:34:14 +0000 |
commit | e669490d0d5e6ed4bb45c895194791f01d038637 (patch) | |
tree | 4eb40b447e6573dbaa1cf593a2cae6758850cb7c /library/library.ml | |
parent | d334716fb2d09dd3304f98ee0dbf39275eac010b (diff) | |
parent | 6497f27021fec4e01f2182014f2bb1989b4707f9 (diff) |
Merge commit 'upstream/8.0pl2'
Diffstat (limited to 'library/library.ml')
-rw-r--r-- | library/library.ml | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/library/library.ml b/library/library.ml index 0477a8f3..cbc8874a 100644 --- a/library/library.ml +++ b/library/library.ml @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: library.ml,v 1.79.2.1 2004/07/16 19:30:36 herbelin Exp $ *) +(* $Id: library.ml,v 1.79.2.2 2004/11/17 14:01:26 herbelin Exp $ *) open Pp open Util @@ -169,8 +169,10 @@ let _ = Summary.survive_section = false } let find_library s = - try - CompilingLibraryMap.find s !libraries_table + CompilingLibraryMap.find s !libraries_table + +let try_find_library s = + try find_library s with Not_found -> error ("Unknown library " ^ (string_of_dirpath s)) @@ -250,7 +252,7 @@ let open_libraries export modl = (fun l m -> let subimport = List.fold_left - (fun l m -> remember_last_of_each l (find_library m)) + (fun l m -> remember_last_of_each l (try_find_library m)) l m.library_imports in remember_last_of_each subimport m) [] modl in @@ -261,7 +263,7 @@ let open_libraries export modl = (* import and export - synchronous operations*) let cache_import (_,(dir,export)) = - open_libraries export [find_library dir] + open_libraries export [try_find_library dir] let open_import i (_,(dir,_) as obj) = if i=1 then @@ -698,7 +700,7 @@ let check_required_library d = open Printf let mem s = - let m = find_library s in + let m = try_find_library s in h 0 (str (sprintf "%dk (cenv = %dk / seg = %dk)" (size_kb m) (size_kb m.library_compiled) (size_kb m.library_objects))) |