瀏覽代碼

Be sure to filter empty sources (h/t to Tuncer and Joe Norton)

pull/3/head
Dave Smith 12 年之前
父節點
當前提交
7dad2b384b
共有 1 個檔案被更改,包括 11 行新增10 行删除
  1. +11
    -10
      src/rebar_port_compiler.erl

+ 11
- 10
src/rebar_port_compiler.erl 查看文件

@ -248,16 +248,17 @@ needs_link(SoName, NewBins) ->
%%
get_specs(Config, AppFile) ->
case rebar_config:get_local(Config, port_specs, []) of
[] ->
%% No spec provided. Construct a spec
%% from old-school so_name and sources
[port_spec_from_legacy(Config, AppFile)];
PortSpecs ->
Filtered = filter_port_specs(PortSpecs),
OsType = os:type(),
[get_port_spec(Config, OsType, Spec) || Spec <- Filtered]
end.
Specs = case rebar_config:get_local(Config, port_specs, []) of
[] ->
%% No spec provided. Construct a spec
%% from old-school so_name and sources
[port_spec_from_legacy(Config, AppFile)];
PortSpecs ->
Filtered = filter_port_specs(PortSpecs),
OsType = os:type(),
[get_port_spec(Config, OsType, Spec) || Spec <- Filtered]
end,
[S || S <- Specs, S#spec.sources /= []].
port_spec_from_legacy(Config, AppFile) ->
%% Get the target from the so_name variable

Loading…
取消
儲存