summaryrefslogtreecommitdiff
path: root/driver/compile.ml
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2000-12-28 05:02:43 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2000-12-28 05:02:43 +0000
commit447c79eadec7db87abc782735c5b06ed4fd020e4 (patch)
treeaf61ce9dacb5809541aad99488a1beaf92c537cb /driver/compile.ml
parentbb1bce2d4d1f7fecea366cd4eb569c294b261c77 (diff)
downloadocaml-447c79eadec7db87abc782735c5b06ed4fd020e4.tar.gz
deplace expand_directory dans Misc, pour generaliser -I +package
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3358 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'driver/compile.ml')
-rw-r--r--driver/compile.ml11
1 files changed, 1 insertions, 10 deletions
diff --git a/driver/compile.ml b/driver/compile.ml
index d9511dfb5c..008331e727 100644
--- a/driver/compile.ml
+++ b/driver/compile.ml
@@ -19,15 +19,6 @@ open Config
open Format
open Typedtree
-(* Expand a -I option: if it starts with +, make it relative to the standard
- library directory *)
-
-let expand_directory s =
- if String.length s > 0 && s.[0] = '+'
- then Filename.concat Config.standard_library
- (String.sub s 1 (String.length s - 1))
- else s
-
(* Initialize the search path.
The current directory is always searched first,
then the directories specified with the -I option (in command-line order),
@@ -39,7 +30,7 @@ let init_path () =
then "+threads" :: !Clflags.include_dirs
else !Clflags.include_dirs in
let exp_dirs =
- List.map expand_directory dirs in
+ List.map (expand_directory Config.standard_library) dirs in
load_path := "" :: List.rev (Config.standard_library :: exp_dirs);
Env.reset_cache()