[erlang-questions] Use of makefiles

Toby Thain toby@REDACTED
Fri Feb 29 06:06:53 CET 2008


On 28-Feb-08, at 5:40 AM, Alexander Lamb wrote:

> Hello list,
>
> I am starting a project in Erlang. I read Armstrong's book. He
> indicates he uses makefiles to manage compiling erlang modules.
>
> Now, I am wondering. Is this overkill? Slightly outdated (makefiles
> make me think of those sendmail config files: totally weird and
> impossible to understand)?

Opinions vary.

>
> What are the various strategies to manage your build / run or build /
> deploy cycles?
>
> Then, what is the strategy used to organize your code?
>
> I thought having a folder for a project, containing the makefile, then
> a subdirectory src and a subdirectory ebin
>
> Unfortunately, I didn't manage to get my makefile work with that
> setup.

Here is a working Makefile for an Erlang project:
http://telegraphics.com.au/svn/ettt/trunk/Makefile

or a really trivial one:
http://telegraphics.com.au/svn/essltest/trunk/Makefile

--Toby

> Here is my makefile:
>
> .SUFFIXES: .erl .beam .yrl
>
> .erl.beam:
> 	erlc -W $<
>
> .yrl.erl:
> 	erlc -W $<
>
> ERL = erl -boot start_clean
>
> MODS = profiles
>
> all: compile
> 	${ERL} -s profiles start
>
> compile: ${MODS:%=%.beam}
>
> clean:
> 	rm -rf *.beam erl_crash.dump
>
> subdirs:
> 	cd src; make
>
> Now this works, but only with .erl and .beam files in the main
> directory.
>
> Thanks,
>
> --
> Alexander Lamb
> Founding Associate
> RODANOTECH Sàrl
>
> 4 ch. de la Tour de Champel
> 1206 Geneva
> Switzerland
>
> Tel:  022 347 77 37
> Fax: 022 347 77 38
>
> http://www.rodanotech.ch
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list