Rebar rebar. config

Source: Internet
Author: User

When using rebar to build a system, you can manually create a rebar. config file to configure the rebar.

Two parameters are important in this file.

% Where to put any downloaded depandencies. Default is 'deps'

Where to store the dependent applications downloaded from the network

?
1 {deps_dir, ["deps"]}.

In fact, this parameter also has another meaning, that is, the directory specified in deps_dir, which can be used as the storage directory of the current project dependent project.

When a rebar is used for building, the rebar searches for related dependencies in the directory specified by deps_dir.

% What dependences es we have, depandencies can be of 3 forms, an application

% Name as an atom, eg. mochiweb, a name and a version (from the. app file), or

% An application name, a version and the SCM details on how to fetch it (SCM

% Type, location and revision). rebar currently support git, Hg, bzr and SVN.

?
12345 {deps, [application_name,           {application_name, "1.0.*"},           {application_name, "1.0.*", {hg, "http://bitbucket.org/basho/rebar/", "f3626d5858a6"}}]}.

Deps parameters are clearly described. Rebar supports obtaining dependent projects from the SCM system.

The dependencies obtained from SCM are stored in the directory specified by deps_dir. Currently, four SCM types are supported: Hg, SVN, Hg, and bzr.

In addition, the deps parameter supports Erlang regular expressions. In this way, we can control the version of the dependent application.

The rebar also supports compiling the driver code, although the support is not complete.

You can use the script specified by port_pre_script to compile C/C ++.

% Tuple which specifies a pre-compilation script to run, and a filename that

% Exists as a result of the script running.

?
1 {port_pre_script, {"script.sh", "skipfile"}}.

Building such an Erlang project is not a big problem.

 

Reprinted: http://www.erlangsir.com/2011/05/27/rebar-rebar-config/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.