forked from cybergrind/rebar-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
project_rebar.config
203 lines (147 loc) · 6.18 KB
/
project_rebar.config
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 ft=erlang et
%% This is a sample rebar.conf file that shows examples of some of rebar's
%% options.
%% == Core ==
%% Extend list of always recursive commands
{recursive_cmds, []}.
%% Check required ERTS or OTP release version
%{require_erts_vsn, ".*"}.
%{require_otp_vsn, ".*"}.
%{require_min_otp_vsn, ".*"}.
%% Additional library directories to add to the code path
{lib_dirs, []}.
%% == Erlang Compiler ==
%% Erlang files to compile before the rest. Rebar automatically compiles
%% parse_transforms and custom behaviours before anything other than the files
%% in this list.
%{erl_first_files, ["src/mymib1.erl", "src/mymib2.erl"]}.
%% Erlang compiler options
{erl_opts, [no_debug_info,
{i, "include"} %,
%{src_dirs, ["src", "src2", "src3"]},
%{platform_define,
% "(linux|solaris|freebsd|darwin)", 'HAVE_SENDFILE'},
%{platform_define, "(linux|freebsd)", 'BACKLOG', 128},
%{platform_define, "R13", 'old_inets'}
]}.
%% MIB Options?
{mib_opts, []}.
%% SNMP mibs to compile first?
{mib_first_files, []}.
%% leex options
{xrl_opts, []}.
%% leex files to compile first
{xrl_first_files, []}.
%% yecc options
{yrl_opts, []}.
%% yecc files to compile first
{yrl_first_files, []}.
%% == EDoc ==
%% EDoc options
{edoc_opts, [{doclet, edown_doclet}]}.
%% == escriptize ==
{escript_name, "application"}.
{escript_incl_apps, []}.
{escript_shebang, "#!/usr/bin/env escript\n"}.
{escript_comment, "%%\n"}.
{escript_emu_args, "%%! -pa application/application/ebin\n"}.
%% == Plugins ==
%% Plugins you wish to include.
%% These can include any module on the code path, including deps.
%% Alternatively, plugins can be placed as source files in the plugin_dir, in
%% which case they will be compiled and loaded dynamically at runtime.
%{plugins, [plugin1, plugin2]}.
%% Override the directory in which plugin sources can be found.
%% Defaults to ./plugins
%{plugin_dir, "some_other_directory"}.
%% == Pre/Post Command Hooks ==
%{pre_hooks, [{clean, "./prepare_package_files.sh"},
% {"linux", compile, "c_src/build_linux.sh"},
% {compile, "escript generate_headers"},
% {compile, "escript check_headers"}]}.
%{post_hooks, [{clean, "touch file1.out"},
% {"freebsd", compile, "c_src/freebsd_tweaks.sh"},
% {eunit, "touch file2.out"},
% {compile, "touch postcompile.out"}]}.
%% == EUnit ==
%% Options for eunit:test()
{eunit_opts, []}.
%% Additional compile options for eunit. erl_opts is also used
{eunit_compile_opts, []}.
%% Same as erl_first_files, but used only when running 'eunit'
{eunit_first_files, []}.
%% == Cover ==
%% Whether to enable coverage reporting. Default is `false'
{cover_enabled, false}.
%% Whether to print coverage report to console. Default is `false'
{cover_print_enabled, false}.
%% Whether to export coverage report to file. Default is `false'
{cover_export_enabled, false}.
%% == Common Test ==
%% Override the default "test" directory in which SUITEs are located
{ct_dir, "itest"}.
%% Override the default "logs" directory in which SUITEs are logged
{ct_log_dir, "test/logs"}.
%% Option to pass extra parameters when launching Common Test
{ct_extra_params, "-boot start_sasl -s myapp"}.
%% Option to use short names (i.e., -sname test) when starting ct
{ct_use_short_names, true}.
%% == QuickCheck ==
%% If qc_mod is unspecified, rebar tries to detect Triq or EQC
%{qc_opts, [{qc_mod, module()}, Options]}.
%% Additional compile options for qc. erl_opts is also used
%{qc_compile_opts, []}.
%% Same as erl_first_files, but used only when running 'qc'
%{qc_first_files, []}.
%% == Cleanup ==
%% Which files to cleanup
%{clean_files, ["file", "file2"]}.
%% == OTP Applications ==
%% Enable validation of the OTP app module list. Default is 'true'
{validate_app_modules, true}.
%% == Dependencies ==
%% Where to put any downloaded dependencies. Default is "deps"
{deps_dir, "deps"}.
%% What dependencies we have, dependencies 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 supports git, hg, bzr, svn, rsync, fossil, and p4.
{deps, [
{lager, "2.1.1", {git, "git://github.com/basho/lager.git", {tag, "2.1.1"} }},
{edown, ".*", {git, "git://github.com/esl/edown.git", "HEAD"}},
{espec, ".*", {git, "git://github.com/lucaspiller/espec.git", "master"}},
{reloader, ".*", {git, "git://github.com/oinksoft/reloader.git", "master"}}
]}.
%% == Subdirectories ==
%% Subdirectories?
% {sub_dirs, ["dir1", "dir2"]}.
%% == Plugins ==
%% Plugins you wish to include.
%% These can include any module on the code path, including deps.
%% Alternatively, plugins can be placed as source files in the plugin_dir, in
%% which case they will be compiled and loaded dynamically at runtime.
% {plugins, [plugin1, plugin2]}.
%% Override the directory in which plugin sources can be found.
%% Defaults to ./plugins
% {plugin_dir, "some_other_directory"}.
%% == xref ==
{xref_warnings, false}.
%% optional extra paths to include in xref:set_library_path/2.
%% specified relative location of rebar.config.
%% e.g. {xref_extra_paths,["../gtknode/src"]}
{xref_extra_paths,[]}.
%% xref checks to run
{xref_checks, [undefined_function_calls, undefined_functions,
locals_not_used, exports_not_used,
deprecated_function_calls, deprecated_functions]}.
%% == template ==
{template_vars, [{"dev_console", [{name_option, "-name dev@localhost"},
{erl_vm_flags, "+S 4 +P 2000000 +pc unicode"},
{env_vars, "-env ERL_MAX_ETS_TABLES 200000 -env ERL_MAX_PORTS 200000"},
{config_files, "-config app.config"},
%{mnesia_options, "-mnesia dir mnesia -mnesia auto_repair true -mnesia dc_dump_limit 40 -mnesia dump_log_write_threshold 40000 "},
{start_services, "-s lager -s mnesia -s reloader"}]
}]
}.