Re: erl -make has unexpected return value when it fails

Magnus Henoch <[email protected]>
Newsgroups gmane.comp.lang.erlang.bugs
Message-ID <[email protected]>
Stavros Aronis <[email protected]> writes:

> 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?

I submitted such a patch a while ago, but never heard anything back:

http://erlang.org/pipermail/erlang-patches/2009-March/000390.html

Feel free to turn it into a pull request :)

Regards,
Magnus
_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.