1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
m(FileList) -> ComFileList = get_file_list(FileList, []), Rtn = make:files(ComFileList), Rtn.
get_file_list([], FileList) -> FileList; get_file_list([File|List], FileList) -> {ok, [{DirList, _}]} = file:consult("./Emakefile"), F = fun(Dir, L) -> WildCard = io_lib:format("~s*~s*.erl", [Dir, File]), L ++ filelib:wildcard(WildCard) end, NewFileList = lists:foldl(F, [], DirList) ++ FileList, get_file_list(List, NewFileList).
|