diff options
author | Jerry Kuch <jerryk@vmware.com> | 2010-11-11 09:24:12 +0000 |
---|---|---|
committer | Jerry Kuch <jerryk@vmware.com> | 2010-11-11 09:24:12 +0000 |
commit | c3385ea6980d564bb56cb3b91a0f27c6d6aa89b5 (patch) | |
tree | 12da96a84663dee16d2ba697538934d12ee30566 /generate_deps | |
parent | 67ee034be7bd9e60bcc0cb780dba5a8fe23b2fae (diff) | |
download | rabbitmq-server-c3385ea6980d564bb56cb3b91a0f27c6d6aa89b5.tar.gz |
generate_deps takes file args from stdin
Diffstat (limited to 'generate_deps')
-rw-r--r-- | generate_deps | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/generate_deps b/generate_deps index 92bca9ae..a6879379 100644 --- a/generate_deps +++ b/generate_deps @@ -2,14 +2,14 @@ %% -*- erlang -*- -mode(compile). -main([TargetFile, EbinDir | ErlsAndHrls ]) -> - ErlFiles = lists:filter(fun (Path) -> lists:suffix(".erl", Path) end, - ErlsAndHrls), +%% We expect the list of Erlang source and header files to arrive on stdin +main([TargetFile, EbinDir]) -> + ErlsAndHrls = string:tokens(io:get_line(""), " \n"), + ErlFiles = [F || F <- ErlsAndHrls, lists:suffix(".erl", F)], Modules = sets:from_list( [list_to_atom(filename:basename(FileName, ".erl")) || FileName <- ErlFiles]), - HrlFiles = lists:filter(fun (Path) -> lists:suffix(".hrl", Path) end, - ErlsAndHrls), + HrlFiles = [F || F <- ErlsAndHrls, lists:suffix(".hrl", F)], IncludeDirs = lists:usort([filename:dirname(Path) || Path <- HrlFiles]), Headers = sets:from_list(HrlFiles), Deps = lists:foldl( |