[erlang-patches] Add support for dependencies Makefile

Björn Gustavsson <>
Tue Dec 15 00:10:52 CET 2009

On Mon, Dec 14, 2009 at 10:00 PM, Jean-Sébastien Pédron
<> wrote:
> The GIT branch may be fetched using the following command:
> git fetch git://github.com/dumbbell/otp.git dependencies_makefile

Thanks! It is good to see that you have written both documentation and
a test suite.

I have squashed your branch into one commit, retaining the commit
message from the first commit, because your branch contains 4 commits
and a merge without any good reason. If that is OK for you, you can
base your further work on that version. See


for how you can set up local branch based on the branch I have merged
into 'pu'. (If my squash is not OK, please clean up your commit
history yourself and email me the reference to your branch.)

The code style needs some work before we can consider including it in
Erlang/OTP. Here are the major things I saw when glancing at your

We always write two percent characters ("%%"), not only one ("%") for
comment lines not preceded by code.

We don't use spaces in around '=' in function heads. We prefer :


In the compiler application, we import functions from the lists
module; we don't write lists:member(...).

In the compiler application, we don't have spaces after commas in
terms (but we do put spaces after commas in function calls).

In the same function, please use either proplists:get_value/2 or
member/2 consistently. (I recommend proplists:get_value/2.)

We write variables without underscores: LineLen, not Line_Len.

Don't use throw from inside a try block in makedep_output/1. As far as
I can see, the only function call that you will need to catch is the
one to io:fwrite/2, so just put that function call in a try block.

Don't use library calls like this

	    File1 = case lists:prefix("./", File) of
		true  -> lists:nthtail(2, File);
		false -> File

when matching will do

	    File1 = case File of
		"./"++File2 -> File2
		_ -> File

(NOT TESTED, but it should work)

Björn Gustavsson, Erlang/OTP, Ericsson AB

More information about the erlang-patches mailing list