mirror of
https://github.com/correl/rebar.git
synced 2024-11-15 03:00:18 +00:00
Be sure to filter empty sources (h/t to Tuncer and Joe Norton)
This commit is contained in:
parent
ebb474b759
commit
7dad2b384b
1 changed files with 11 additions and 10 deletions
|
@ -248,16 +248,17 @@ needs_link(SoName, NewBins) ->
|
||||||
%%
|
%%
|
||||||
|
|
||||||
get_specs(Config, AppFile) ->
|
get_specs(Config, AppFile) ->
|
||||||
case rebar_config:get_local(Config, port_specs, []) of
|
Specs = case rebar_config:get_local(Config, port_specs, []) of
|
||||||
[] ->
|
[] ->
|
||||||
%% No spec provided. Construct a spec
|
%% No spec provided. Construct a spec
|
||||||
%% from old-school so_name and sources
|
%% from old-school so_name and sources
|
||||||
[port_spec_from_legacy(Config, AppFile)];
|
[port_spec_from_legacy(Config, AppFile)];
|
||||||
PortSpecs ->
|
PortSpecs ->
|
||||||
Filtered = filter_port_specs(PortSpecs),
|
Filtered = filter_port_specs(PortSpecs),
|
||||||
OsType = os:type(),
|
OsType = os:type(),
|
||||||
[get_port_spec(Config, OsType, Spec) || Spec <- Filtered]
|
[get_port_spec(Config, OsType, Spec) || Spec <- Filtered]
|
||||||
end.
|
end,
|
||||||
|
[S || S <- Specs, S#spec.sources /= []].
|
||||||
|
|
||||||
port_spec_from_legacy(Config, AppFile) ->
|
port_spec_from_legacy(Config, AppFile) ->
|
||||||
%% Get the target from the so_name variable
|
%% Get the target from the so_name variable
|
||||||
|
|
Loading…
Reference in a new issue