summaryrefslogtreecommitdiff
path: root/rebar.config
blob: 83da0e57e4d817703237ba008dc124313b32a17b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 ft=erlang et

{deps, [
       {erlware_commons, "",
        {git, "https://github.com/erlware/erlware_commons.git",
         {branch, "master"}}},
       {providers, "",
        {git, "https://github.com/tsloughter/providers.git",
         {tag, "v1.3.1"}}},
       {erlydtl, "",
        {git, "https://github.com/erlydtl/erlydtl.git",
         {branch, "master"}}},
       {relx, "",
        {git, "https://github.com/erlware/relx.git",
         {branch, "master"}}},
       {getopt, "",
        {git, "https://github.com/jcomellas/getopt.git",
         {branch, "master"}}}]}.

{escript_incl_apps,
 [getopt, merl, erlydtl, erlware_commons, relx,  providers, rebar]}.
{escript_top_level_app, rebar}.
{escript_name, rebar3}.
{escript_emu_args, "%%! +sbtu +A0\n"}.
%% escript_incl_extra is for internal rebar-private use only.
%% Do not use outside rebar. Config interface is not stable.
{escript_incl_extra, [{"priv/templates/*", "."}, {"rebar/include/*", "."}]}.

{erl_opts,
 [{platform_define, "R14", no_callback_support},
  {platform_define, "^[0-9]+", namespaced_types},
  {platform_define, "^R1[4|5]", deprecated_crypto},
  debug_info,
  warnings_as_errors]}.

{erlydtl_opts, [{doc_root, "priv/templates"},
                {compiler_options, [report, return, debug_info]}]}.

{dialyzer_plt_apps, [common_test, dialyzer, erlydtl, eunit, snmp]}.

{provider_hooks, [{post, [{compile, {erlydtl, compile}}]}]}.

%% Profiles
{profiles, [{test,
             [{deps, [
                     {meck, "", {git, "https://github.com/eproxus/meck.git", {tag, "0.8.2"}}}
                     ]}
             ]
            },

            %% We don't want erlydtl to attempt to run on the first compile pass to bootstrap
            {bootstrap, [{overrides, [{override, relx, [{provider_hooks, [{post, []}]}]}]},
                         {provider_hooks, [{post, []}]}]}
           ]}.

%% Overrides
{overrides, [{override, erlware_commons, [{plugins, []}]},
             {override, merl, [{pre_hooks, [{"(linux|darwin|solaris)", compile, "make -C \"$REBAR_DEPS_DIR/merl\" all -W test"},
                                            {"(freebsd|netbsd|openbsd)", compile, "gmake -C \"$REBAR_DEPS_DIR/merl\" all"},
                                            {"win32", compile, "make -C \"%REBAR_DEPS_DIR%/merl\" all -W test"},
                                            {eunit,
                                             "erlc -I include/erlydtl_preparser.hrl -o test"
                                             " test/erlydtl_extension_testparser.yrl"},
                                            {"(linux|darwin|solaris)", eunit, "make -C \"$REBAR_DEPS_DIR/merl\" test"},
                                            {"(freebsd|netbsd|openbsd)", eunit, "gmake -C \"$REBAR_DEPS_DIR/merl\" test"},
                                            {"win32", eunit, "make -C \"%REBAR_DEPS_DIR%/merl\" test"}
                                           ]}]},
             {override, erlydtl, [{pre_hooks, []}]}
            ]}.