Packages

Ceylan-Myriad, a generic-purpose Erlang toolbox, as an OTP application library here (see http://myriad.esperide.org)

Current section

Files

Jump to
myriad rebar.config
Raw

rebar.config

% This is a (manually crafted) configuration file of rebar3, so that
% Ceylan-Myriad can better integrate in the current OTP ecosystem, despite its
% (more complex) build based on GNU make.
% Base layout was obtained thanks to: 'rebar3 new lib myriad', as Myriad is a
% library OTP application (without supervision trees).
% To be run from the library root as 'rebar3 compile' or 'rebar3 release'.
% See also:
% - http://erlang.org/doc/design_principles/release_structure.html
% - https://www.rebar3.org/docs/releases
% - https://learnyousomeerlang.com/release-is-the-word
% Settings for the 'default' profile follow.
% No dependency (except Erlang of course):
{deps, []}.
% We need to rely on our dedicated build procedure (ex: for the parse transforms
% involved):
%
% Could not set REBAR_PROFILE=$(REBAR_PROFILE):
%
%{pre_hooks, [ {compile, "make -s rebar3-info"} ]}.
{pre_hooks, [ {compile, "make -s rebar3-compile"} ]}.
%{post_hooks, [
% {compile, "echo 'Myriad post-compile hook!'"} ]}.
% For release generation:
%
% (defaults are for the development mode)
%
{relx, [
{release, {myriad_release, {cmd, "cat GNUmakevars.inc | grep 'MYRIAD_VERSION := '| sed 's|^MYRIAD_VERSION := ||1' | tr -d '\n'"}}, [sasl, myriad]},
%{sys_config, "./config/sys.config"},
%{vm_args, "./config/vm.args"},
{dev_mode, true},
{include_erts, false},
{extended_start_script, true},
{include_src, false}
]}.
{profiles, [
% Production mode:
{prod, [ {relx, [
% Same as default profile:
{release, {myriad_release, {cmd, "cat GNUmakevars.inc | grep 'MYRIAD_VERSION := '|sed 's|^MYRIAD_VERSION := ||1' | tr -d '\n'"}}, [sasl, myriad]},
% For the build makefiles:
{env, [ { 'REBAR_PROFILE', "prod" } ] },
% Not wanting the release to contain symlinks to applications:
{dev_mode, false},
% Creating a full target system:
{include_erts, true},
{extended_start_script, true},
{include_src, false}
]}]
}] }.
% For packages:
%
% (use 'rebar3 update' to enable the hex plugin)
%
{plugins, [rebar3_hex]}.