Erlang automake project

I recently wrote a new Erlang project call automake to ease build of Erlang module. This module is especially useful during development phase.

Erlang is distributed with a make module that build standard Erlang files from information provided in Emakefile files (See Erlang Make Documentation).

However, I get bored having to write and maintained Emakefile manually. I decided to write a tool to do the job for me and this is what Erlang automake does. It try to does it “smartly” by finding the location of your needed include files and taking this information into account in your Emakefile.

It does much more however. You can pass several project directories and Erlang automake will build an Erlang Emakefile compiling all you project to a single directory. This is useful during development as it ease path setting, and simplify dynamic code reload. This is particularly usefull if you are developing code base on several different repository (example: code coming from ejabberd main repository, from ejabberd-modules repository and/or some other private projects.

More features are already there or are planned but I will not take about them yet.

The code is developed in ProcessOne contribs Subversion repository and is tracked in ProcessOne Erlang Forge.

Your ideas, comments, patchs, feature requests are of course welcome.

Getting started

Install the Erlang Automake tool somewhere in your path. You should also install the eautomake script as it acts as a useful wrapper.

Once your done, you can experiment with the following commands:

  • eautomake: Will generate an Emakefile for the project in the current directory. It will also create an Eautomake file that describe your project.
  • eautomake create Dir1 Dir2 …: Create a build file for several directories. It also generate Eautomake file that kept the lists of your projects directories. To update your EMakefile, the eautomake command is enough as the project description is then read from Eautomake file.
  • eautomake: Will update emakefile to take new Erlang source file into accounts.

“erl -make” command is used to compile your project once the Eautomake file has been generated.

Let us know what you think 💬

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.