|
@@ -39,6 +39,7 @@ let exclude : string list ref = ref []
|
|
|
|
|
|
class explore_class_path_task cs com recursive f_pack f_module dir pack = object(self)
|
|
class explore_class_path_task cs com recursive f_pack f_module dir pack = object(self)
|
|
inherit server_task ["explore";dir] 50
|
|
inherit server_task ["explore";dir] 50
|
|
|
|
+ val platform_str = platform_name_macro com
|
|
|
|
|
|
method private execute : unit =
|
|
method private execute : unit =
|
|
let dot_path = (String.concat "." (List.rev pack)) in
|
|
let dot_path = (String.concat "." (List.rev pack)) in
|
|
@@ -70,7 +71,16 @@ class explore_class_path_task cs com recursive f_pack f_module dir pack = object
|
|
let l = String.length file in
|
|
let l = String.length file in
|
|
if l > 3 && String.sub file (l - 3) 3 = ".hx" then begin
|
|
if l > 3 && String.sub file (l - 3) 3 = ".hx" then begin
|
|
try
|
|
try
|
|
- let name = String.sub file 0 (l - 3) in
|
|
|
|
|
|
+ let name =
|
|
|
|
+ let name = String.sub file 0 (l - 3) in
|
|
|
|
+ try
|
|
|
|
+ let dot_pos = String.rindex name '.' in
|
|
|
|
+ if platform_str = String.sub file dot_pos (String.length name - dot_pos) then
|
|
|
|
+ String.sub file 0 dot_pos
|
|
|
|
+ else
|
|
|
|
+ raise Exit
|
|
|
|
+ with Not_found -> name
|
|
|
|
+ in
|
|
let path = (List.rev pack,name) in
|
|
let path = (List.rev pack,name) in
|
|
let dot_path = if dot_path = "" then name else dot_path ^ "." ^ name in
|
|
let dot_path = if dot_path = "" then name else dot_path ^ "." ^ name in
|
|
if (List.mem dot_path !exclude) then () else f_module (dir ^ file) path;
|
|
if (List.mem dot_path !exclude) then () else f_module (dir ^ file) path;
|