[erlang-bugs] erl -make has unexpected return value when it fails

Stavros Aronis aronisstav@REDACTED
Fri Jan 23 14:38:16 CET 2015


Hello!

Uncommon as it may be, "erl -make" is a valid way to make small projects
that use an Emakefile. However, it can be the case that such a command
fails:

$ erl -pa ebin -make
Recompile: src/packets
src/packets.erl:1: parameterized modules are no longer supported
src/packets.erl:10: variable 'PacketVer' is unbound

Contrary to other 'make' tools, this failure is *not* reflected in the
return value of "erl -make":

$ echo $?
0

A simple way to fix this would be to add a function (say
'make:all_and_exit/0') which matches the return value of 'make:all/0' and
exits with the correct code and also modify erlexec.c to call that function
instead of 'make:all/0'.

Would such a patch be acceptable?

Best regards,

Stavros Aronis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20150123/2bc5ca9a/attachment.htm>


More information about the erlang-bugs mailing list