1 %%%-------------------------------------------------------------------
2 %%% File : execution.erl
6 %%% Created : 8 Apr 2011 by <>
7 %%%-------------------------------------------------------------------
9 -include("makerl.hrl").
12 -spec
execute(string(), [string()], options_type()) -> [build_result()].
13 execute(File
, Targets
, CmdLineOptions
) ->
14 config_parser:parse_file(File
, CmdLineOptions
),
15 ok
= check_unknown_targets(Targets
),
16 [ task:build_target(T
) || T
<- Targets
]. %% Bind? Aggregated results?
18 -spec
check_unknown_targets([string()]) -> ok
.
19 check_unknown_targets(Targets
) ->
20 NotFound
= lists:filter(fun(T
) ->
21 case task_registry:find_pid_by_target(T
) of
29 L
-> throw({error
, {targets_unknown
, L
}})