Skip to content
Some rake tasks to build an erlang project
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



The ruby build tool rake can be extended by the addition of new libraries.
erl_rake is a set of rake libraries and scripts to add an erlang support to rake


Main author: Nicolas Charpentier <>

Git repository

The repository contains:

  • all the rake scripts in the directory rakelib.
  • a sample application in the directory sample.


erl_rake libraries installation

You already use some extension

Copy the content of the rakelib directory to your own library.

You don’t have any extension

Two possibilities:

  • Copy the rakelib directory under the top directory of your project. You will be able to use rake without any options
  • or copy the rakelib anywhere. You will have to run rake with the option -rakelib << directory >>


erl_rake is designed to be used on projects using standard OTP directory layout.
Your project must contain a lib directory in which your OTP application code will be created.
To build your project with rake, you have to create a Rakefile at the top level.
The minimal content of it is

require ‘rake’
task :default => [“erlang:compile”, “erlang:test”]

At this step in your top directory you can try to execute rake
At the first execution a configuration file erl_config.rb is created.

#ERL_TOP is the location of the erlang installation.
#USE_EMAKE tells erl_rake how to compile erlang sources.
#Valid values are true and false.
#ERLC_FLAGS are the flags to be passed to the compiler ERLC.
#EMAKE_COMPILE_OPTIONS are the flags to be passed to the EMAKE.
#ERL_FLAGS are the flags to be passed to ERL when erl_rake
#start a node.

Tasks descriptions


This task creates a new application skeleton. After executing rake otp:new_application[name], the application directory is created in the lib directory.

The skeleton includes 2 specific files:

  • lib/name/vsn.config: Contains the version number
  • lib/name/src/ Contains a template for the app file. The real application file is generated by compilation tasks


This task creates a new release skeleton. After executing rake otp:new_release[name], the application directory is created in the lib directory.

The skeleton includes 2 specific files:

  • lib/name/src/name.rel.src: Contains a template for the rel file. The real rel file is generated by compilation tasks
  • lib/name/vsn.config: Contains the release name

The skeleton also creates a configuration directory called ‘release_config’. This directory contains 2 files:

  • sys.config: The main configuration file
  • startup.conf: script file sourced by release startup scripts
    Those two files will be used during release packaging.


This task compiles all source code in the lib directory (modules, applications, release files).


This tasks runs unittests for each application under lib directory.
Tests (located in the test directory) can be either:

  • plain eunit modules
  • a file containing eunit test description. The file must be named “test.desc”


This task runs unittests for a given application

erlang:cover and erlang:cover[name]

This task runs a unittest coverage analysis. Coverage results are stored in the “cover” directory of each application.


This task generates a tarball archive for each releases in the directory tree. Archives are generated in TOP/distrib.


Starts an erlang shell with a code path containing all beam under lib directory


Deploy a release locally. All start-up files are generated in order to use beam files located under TOP/lib.
The configuration file used is a copy of TOP/AppX/release_config/sys.config


Start the local release ‘version’

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.