rebar.eclass

Name

rebar.eclass -- Build Erlang/OTP projects using dev-util/rebar.

Description

An eclass providing functions to build Erlang/OTP projects using dev-util/rebar.

rebar is a tool which tries to resolve dependencies itself which is by cloning remote git repositories. Dependent projects are usually expected to be in sub-directory 'deps' rather than looking at system Erlang lib directory. Projects relying on rebar usually don't have 'install' make targets. The eclass workarounds some of these problems. It handles installation in a generic way for Erlang/OTP structured projects.

Supported EAPIs

7 8

Transitively Provided Eclasses

  • rebar-utils

Exported Phases

  • src_compile

  • src_test

  • src_install

  • src_prepare

  • src_configure

Functions

erebar <targets>

Run rebar with verbose flag. Die on failure.

rebar_src_prepare

Prevent rebar from fetching and compiling dependencies. Set version in project description file if it's not set.

Existence of rebar.config is optional, but file description file must exist at 'src/${PN}.app.src'.

rebar_src_configure

Configure with ERL_LIBS set.

rebar_src_compile

Compile project with rebar.

rebar_src_test

Run unit tests.

rebar_src_install

Install BEAM files, include headers, executables and native libraries. Install standard docs like README or defined in DOCS variable.

Function expects that project conforms to Erlang/OTP structure.

Authors

Amadeusz Żołnowski <aidecoe@gentoo.org>

Reporting Bugs

Please report bugs via https://bugs.gentoo.org/