Browse Source

Handle erl_first_files with missing extension

Makes lasp and nkbase work.
Loïc Hoguin 10 years ago
parent
commit
4b6b623278
1 changed files with 8 additions and 4 deletions
  1. 8 4
      core/deps.mk

+ 8 - 4
core/deps.mk

@@ -206,10 +206,14 @@ define dep_autopatch_rebar.erl
 		end
 		end
 	end(),
 	end(),
 	fun() ->
 	fun() ->
-		First = case lists:keyfind(erl_first_files, 1, Conf) of false -> []; {_, Files} ->
-			Names = [[" ", begin "lre." ++ Elif = lists:reverse(F), lists:reverse(Elif) end]
-				 || "src/" ++ F <- Files],
-			Write(io_lib:format("COMPILE_FIRST +=~s\n", [Names]))
+		case lists:keyfind(erl_first_files, 1, Conf) of
+			false -> ok;
+			{_, Files} ->
+				Names = [[" ", case lists:reverse(F) of
+					"lre." ++ Elif -> lists:reverse(Elif);
+					Elif -> lists:reverse(Elif)
+				end] || "src/" ++ F <- Files],
+				Write(io_lib:format("COMPILE_FIRST +=~s\n", [Names]))
 		end
 		end
 	end(),
 	end(),
 	FindFirst = fun(F, Fd) ->
 	FindFirst = fun(F, Fd) ->