Erlang Automake is designed to remove the burden of writing and
maintaining pure Erlang "Emakefile" manually. It also offers several
other features whose purpose is to ease the creation of different
build environment for your Erlang code.
1 Contents
2 Introduction
Erlang Automake is designed to remove the burden of writing and
maintaining pure Erlang "Emakefile" manually. It also offers several
other features whose purpose is to ease the creation of different
build environment for your Erlang code.
3 Running automake
Simply type erl -s automake in your project directory and the
Emakefile project file will be create automatically.
4 Advanced features
Erlang Automake can also create fresh build environment to help in
your multi-package Erlang development.
One of the major use is the following:
-
I am working on a project involving code from several
repositories (For example, ejabberd, additional customer ejabberd
plugins and Eunit and Quickcheck tests modules.
-
I want to easily set up the environment for such a development. I do not want to spend time setting paths, preparing shell scripts to make sure everything is
-
I want to be able to rebuild all changed code and reload it easily from the command-line.
-
I want to be able to rebuild and reload a file directly from Emacs with Erlang mode.
This type of environment can be set up in 3 minutes with Erlang Automake. It
does not implies that you have to stop writing "Makefile"s. For
example, ejabberd still has its own build chain to compile Erlang and
C files. However, once your C files are stable you can simply setup
new build environment easily with Erlang Automake.
Here is how:
-
Create an "Eautomake" file containing the path to all your
Erlang applications needed for this project. Applications does not
have to have the same structure. No Makefile or Emakefile is
required as long as your code is pure Erlang.
-
Setup your environment variables (for example ejabberd needs the
path to its C library (EJABBERD_SO_PATH), path to its message files,
etc). If a project contain C code, you thus have to build it
separately in your path.
-
type "erl -s automake" from the command-line in your project
environment. Erlang automake will build an Emakefile allowing to
rebuild all the Erlang module of your applications at once.
-
type "erl -make" from the command-line in your project
environment to rebuild your beam files from Erlang sources. As a
default all beam files will be placed and updated in an ebin
subdirectory.
-
type "erl -pa ebin" to start Erlang, pointing to the default path
containing all beam files. Your environment is now set up.
-
if you have an Erlang shell already opened and running your
project, you can reload the new code with the command:
automake:reload().