summaryrefslogtreecommitdiff
path: root/rebar.config.sample
blob: 0a7fb11accbaa281d02fc594ff2867831f8397e3 (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
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
%% -*- 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 ==

%% 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, ["mymib1", "mymib2"]}.

%% Erlang compiler options
{erl_opts, [no_debug_info, {i, "myinclude"}, {src_dirs, ["src1", "src2"]},
            {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, []}.

%% == EDoc ==

%% EDoc options
{edoc_opts, []}.

%% == Port Compiler ==

%% List of filenames or wildcards to be compiled. May also contain a tuple
%% consisting of a regular expression to be applied against the system
%% architecture and a list of filenames or wildcards to include should the
%% expression pass. Default is `"c_src/*.c"'
{port_sources, ["c_src/*.c", {"R14", ["c_src/*.c"]}]}.

%% Port compilation environment variables. See rebar_port_compiler.erl for
%% more info. Default is `[]'
{port_envs, []}.

%% Custom name of the port driver .so file. Defaults to `<Application>_drv.so'.
{so_name, "driver.so"}.

%% so_specs - useful for building multiple *.so files
%%            from one or more object files
{so_specs, [{"priv/so_name.so", ["c_src/object_file_name.o"]}]}.

%% == LFE Compiler ==

%% LFE files to compile before the rest
{lfe_first_files, []}.

%% Options for the LFE compiler: reuse {erl_opts, []}

%% == ErlyDTL Compiler ==

%% Options for the ErlyDTL compiler
{erlydtl_opts, []}.

%% == EUnit ==

%% Options for eunit:test()
{eunit_opts, []}.

%% Additional compile options for eunit. erl_opts from above is also used
{eunit_compile_opts, []}.

%% Same as erl_first_files, but used only when running 'eunit'
{eunit_first_files, []}.

%% 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}.

%% == Common Test ==

%% Option to pass extra parameters when launching Common Test
{ct_extra_params, "-boot start_sasl -s myapp"}.

%% == Cleanup ==

%% Which files to cleanup
{clean_files, ["file", "file2"]}.

%% == Reltool ==

%% Target directory for the release
{target, "target"}.

%% == OTP Applications ==

%% Binaries to link into the erlang path?
{app_bin, []}.

%% Enable validation of the OTP app module list. Default is 'true'
{validate_app_modules, true}.

%% == Dependencies ==

%% Where to put any downloaded depandencies. Default is `deps'
{deps_dir, ["deps"]}.

%% What dependancies 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 supports git, hg, bzr and svn.
{deps, [application_name,
        {application_name, "1.0.*"},
        {application_name, "1.0.*",
         {git, "git://github.com/basho/rebar.git", {branch, "master"}}}]}.

%% == Subdirectories ==

%% Subdirectories?
{sub_dirs, ["dir1", "dir2"]}.

%% == Pre/Post Command Hooks ==

{pre_hooks, [{clean, "./prepare_package_files.sh"},
             {compile, "escript generate_headers"}]}.

{post_hooks, [{clean, "touch file1.out"},
              {eunit, "touch file2.out"},
              {compile, "touch postcompile.out"}]}.

%% == xref ==

{xref_warnings, false}.
%% xref checks to run
{xref_checks, [exports_not_used, undefined_function_calls]}.