[erlang-questions] [erlang-bugs] erl -make returns ok status after compilation error
Dennis Novikov
dennis.novikov@REDACTED
Fri Oct 16 15:34:18 CEST 2009
On Fri, Oct 16, 2009 at 12:47 PM, Maxim Treskin <zerthurd@REDACTED> wrote:
>
> Hello
>
> Make in erlang dose not handles errors in compilation.
>
> If some files in application broken, compilation with erlc returns 1,
> while erl -make returns 0 what indicates that compilation i
> successful.
> So, when we uses Makefile, where some targets should been compiled
> with erl -make, and when one target compilation is broken, make cannot
> catch this.
I had to use wrapper like this:
-module(mk).
-export([all/0]).
all() ->
case make:all() of
up_to_date ->
erlang:halt(0);
_ ->
erlang:halt(1)
end.
erl -noinput -noshell -s mk all
More information about the erlang-questions
mailing list