summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Pouillard <np@nicolaspouillard.fr>2007-11-26 13:04:25 +0000
committerNicolas Pouillard <np@nicolaspouillard.fr>2007-11-26 13:04:25 +0000
commitef00b672ecd7f8d0f2bf7e442c0306465eb53aa8 (patch)
tree77b4c471e57e74094bf77294b748cc77f032a6eb
parentca536a84589892b05ed80686266ecf12fe0fa605 (diff)
[ocamlbuild] Forbid non implicit pathnames as include/exclude directories (PR#4304).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8619 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--ocamlbuild/options.ml11
1 files changed, 9 insertions, 2 deletions
diff --git a/ocamlbuild/options.ml b/ocamlbuild/options.ml
index ca8e0b55d..b2bb212c2 100644
--- a/ocamlbuild/options.ml
+++ b/ocamlbuild/options.ml
@@ -217,7 +217,7 @@ let init () =
if log = "" then Log.init None
else if not (Filename.is_implicit log) then
failwith
- (sprintf "Bad log file name: the file name must be implicit (%S)" log)
+ (sprintf "Bad log file name: the file name must be implicit (not %S)" log)
else
let log = filename_concat !build_dir log in
Shell.mkdir_p (Filename.dirname log);
@@ -240,10 +240,17 @@ let init () =
reorder ignore_list ignore_list_internal;
reorder show_tags show_tags_internal;
+ let check_dir dir =
+ if Filename.is_implicit dir then
+ sys_file_exists dir
+ else
+ failwith
+ (sprintf "Included or excluded directories must be implicit (not %S)" dir)
+ in
let dir_reorder my dir =
let d = !dir in
reorder dir my;
- dir := List.filter sys_file_exists (!dir @ d)
+ dir := List.filter check_dir (!dir @ d)
in
dir_reorder my_include_dirs include_dirs;
dir_reorder my_exclude_dirs exclude_dirs;