@@ -119,9 +119,23 @@ port_spec_from_legacy(Config) ->
119119 objects = port_objects (Sources ),
120120 opts = [port_opt (Config , O ) || O <- fill_in_defaults ([])]}.
121121
122+ maybe_report_wc (Source , Found ) ->
123+ case Found of
124+ [] ->
125+ rebar_api :warn (" Found no source files for:~n~p " , [Source ]);
126+ _ ->
127+ ok
128+ end ,
129+ Found .
130+
131+ wildcard (Source ) ->
132+ maybe_report_wc (Source , filelib :wildcard (Source )).
133+ wildcard (Source , WorkDir ) ->
134+ maybe_report_wc (Source , filelib :wildcard (Source , WorkDir )).
135+
122136port_sources (WorkDir , Sources ) ->
123137 lists :flatmap (fun (Source ) ->
124- filelib : wildcard (Source , WorkDir )
138+ wildcard (Source , WorkDir )
125139 end , Sources ).
126140
127141maybe_switch_extension ({win32 , nt }, Target ) ->
@@ -151,7 +165,7 @@ get_port_spec(Config, OsType, {_Arch, Target, Sources, Opts}) ->
151165 Source1 = expand_env (Source , Env ),
152166 Source2 = rebar_utils :escape_chars (
153167 filename :join (rebar_state :dir (Config ), Source1 )),
154- filelib : wildcard (Source2 )
168+ wildcard (Source2 )
155169 end , Sources ),
156170 LinkLang =
157171 case lists :any (
0 commit comments