Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 7dad2b384b93889961383f1f75df5be865954639 1 parent ebb474b
Dave Smith dizzyd authored

Showing 1 changed file with 11 additions and 10 deletions. Show diff stats Hide diff stats

  1. +11 10 src/rebar_port_compiler.erl
21 src/rebar_port_compiler.erl
@@ -248,16 +248,17 @@ needs_link(SoName, NewBins) ->
248 248 %%
249 249
250 250 get_specs(Config, AppFile) ->
251   - case rebar_config:get_local(Config, port_specs, []) of
252   - [] ->
253   - %% No spec provided. Construct a spec
254   - %% from old-school so_name and sources
255   - [port_spec_from_legacy(Config, AppFile)];
256   - PortSpecs ->
257   - Filtered = filter_port_specs(PortSpecs),
258   - OsType = os:type(),
259   - [get_port_spec(Config, OsType, Spec) || Spec <- Filtered]
260   - end.
  251 + Specs = case rebar_config:get_local(Config, port_specs, []) of
  252 + [] ->
  253 + %% No spec provided. Construct a spec
  254 + %% from old-school so_name and sources
  255 + [port_spec_from_legacy(Config, AppFile)];
  256 + PortSpecs ->
  257 + Filtered = filter_port_specs(PortSpecs),
  258 + OsType = os:type(),
  259 + [get_port_spec(Config, OsType, Spec) || Spec <- Filtered]
  260 + end,
  261 + [S || S <- Specs, S#spec.sources /= []].
261 262
262 263 port_spec_from_legacy(Config, AppFile) ->
263 264 %% Get the target from the so_name variable

0 comments on commit 7dad2b3

Please sign in to comment.
Something went wrong with that request. Please try again.