Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 168 lines (118 sloc) 5.041 kb
c466076 @tuncer Clean up emacs file local variables
tuncer authored
1 %% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
cad24b2 @dizzyd Adding rebar.config.sample from vagabond (http://bitbucket.org/vagabond/...
dizzyd authored
2 %% ex: ts=4 sw=4 ft=erlang et
3 %% This is a sample rebar.conf file that shows examples of some of rebar's
4 %% options.
5
6 %% == Core ==
7
8 %% Additional library directories to add to the code path
9 {lib_dirs, []}.
10
11 %% == Erlang Compiler ==
12
13 %% Erlang files to compile before the rest. Rebar automatically compiles
14 %% parse_transforms and custom behaviours before anything other than the files
15 %% in this list.
16 {erl_first_files, ["mymib1", "mymib2"]}.
17
18 %% Erlang compiler options
be209f2 @tuncer Make debug_info default
tuncer authored
19 {erl_opts, [no_debug_info, {i, "myinclude"}, {src_dirs, ["src1", "src2"]},
952b838 @tuncer Document platform_define in sample config
tuncer authored
20 {platform_define,
d203ff1 @tuncer Fix whitespace error in rebar.config.sample
tuncer authored
21 "(linux|solaris|freebsd|darwin)", 'HAVE_SENDFILE'},
5b05e54 @norton Add otp_release to platform string
norton authored
22 {platform_define, "(linux|freebsd)", 'BACKLOG', 128},
23 {platform_define, "R13", 'old_inets'}]}.
cad24b2 @dizzyd Adding rebar.config.sample from vagabond (http://bitbucket.org/vagabond/...
dizzyd authored
24
25 %% MIB Options?
26 {mib_opts, []}.
27
28 %% SNMP mibs to compile first?
29 {mib_first_files, []}.
30
9cafd06 @Vagabond Document edoc_opts
Vagabond authored
31 %% == EDoc ==
32
33 %% EDoc options
34 {edoc_opts, []}.
35
cad24b2 @dizzyd Adding rebar.config.sample from vagabond (http://bitbucket.org/vagabond/...
dizzyd authored
36 %% == Port Compiler ==
37
38 %% Port compilation environment variables. See rebar_port_compiler.erl for
39 %% more info. Default is `[]'
7c418ed @tuncer Add support for target-specific port options
tuncer authored
40 {port_env, [{"CFLAGS", "$CFLAGS -Ifoo"},
41 {"freebsd", "LDFLAGS", "$LDFLAGS -lfoo"}]}.
cad24b2 @dizzyd Adding rebar.config.sample from vagabond (http://bitbucket.org/vagabond/...
dizzyd authored
42
6898eff @tuncer Rework port compiler support
tuncer authored
43 %% port_specs
44 %% List of filenames or wildcards to be compiled. May also contain a tuple
45 %% consisting of a regular expression to be applied against the system
46 %% architecture as a filter.
47 {port_specs, [{"priv/so_name.so", ["c_src/*.c"]},
7c418ed @tuncer Add support for target-specific port options
tuncer authored
48 {"linux", "priv/hello_linux", ["c_src/hello_linux.c"]},
49 {"linux", "priv/hello_linux", ["c_src/*.c"], [{env, []}]}}.
8711d95 @tuncer Document so_specs
tuncer authored
50
cad24b2 @dizzyd Adding rebar.config.sample from vagabond (http://bitbucket.org/vagabond/...
dizzyd authored
51 %% == LFE Compiler ==
52
53 %% LFE files to compile before the rest
54 {lfe_first_files, []}.
55
67af251 @tuncer Remove lfe_opts (suggested by Tim Dysinger)
tuncer authored
56 %% Options for the LFE compiler: reuse {erl_opts, []}
cad24b2 @dizzyd Adding rebar.config.sample from vagabond (http://bitbucket.org/vagabond/...
dizzyd authored
57
58 %% == ErlyDTL Compiler ==
59
60 %% Options for the ErlyDTL compiler
61 {erlydtl_opts, []}.
62
63 %% == EUnit ==
64
65 %% Options for eunit:test()
66 {eunit_opts, []}.
67
68 %% Additional compile options for eunit. erl_opts from above is also used
69 {eunit_compile_opts, []}.
70
e407838 @tuncer Document eunit_first_files
tuncer authored
71 %% Same as erl_first_files, but used only when running 'eunit'
72 {eunit_first_files, []}.
73
cad24b2 @dizzyd Adding rebar.config.sample from vagabond (http://bitbucket.org/vagabond/...
dizzyd authored
74 %% Whether to enable coverage reporting. Default is `false'
75 {cover_enabled, false}.
f2244b2 @Vagabond Add optional eunit coverage report to terminal
Vagabond authored
76
77 %% Whether to print coverage report to console. Default is `false'
78 {cover_print_enabled, false}.
cad24b2 @dizzyd Adding rebar.config.sample from vagabond (http://bitbucket.org/vagabond/...
dizzyd authored
79
2d38597 @hyperthunk Pass extra params to ct (thanks Mickael Remond)
hyperthunk authored
80 %% == Common Test ==
81
286a2a8 @hyperthunk Add support for customising common test directory
hyperthunk authored
82 %% Override the default "test" directory in which SUITEs are located
83 {ct_dir, "itest"}.
84
2d38597 @hyperthunk Pass extra params to ct (thanks Mickael Remond)
hyperthunk authored
85 %% Option to pass extra parameters when launching Common Test
86 {ct_extra_params, "-boot start_sasl -s myapp"}.
87
cad24b2 @dizzyd Adding rebar.config.sample from vagabond (http://bitbucket.org/vagabond/...
dizzyd authored
88 %% == Cleanup ==
89
90 %% Which files to cleanup
91 {clean_files, ["file", "file2"]}.
92
93 %% == Reltool ==
94
95 %% Target directory for the release
96 {target, "target"}.
97
98 %% == OTP Applications ==
99
100 %% Binaries to link into the erlang path?
101 {app_bin, []}.
102
852edb0 @tuncer Document validate_app_modules option
tuncer authored
103 %% Enable validation of the OTP app module list. Default is 'true'
104 {validate_app_modules, true}.
105
86753c4 @tuncer Cleanup rebar.config.sample
tuncer authored
106 %% == Dependencies ==
cad24b2 @dizzyd Adding rebar.config.sample from vagabond (http://bitbucket.org/vagabond/...
dizzyd authored
107
b65d590 @tuncer Fix deps_dir sample config
tuncer authored
108 %% Where to put any downloaded dependencies. Default is "deps"
109 {deps_dir, "deps"}.
cad24b2 @dizzyd Adding rebar.config.sample from vagabond (http://bitbucket.org/vagabond/...
dizzyd authored
110
f4817ca @djui Fix typo: 'dependency'
djui authored
111 %% What dependencies we have, dependencies can be of 3 forms, an application
cad24b2 @dizzyd Adding rebar.config.sample from vagabond (http://bitbucket.org/vagabond/...
dizzyd authored
112 %% name as an atom, eg. mochiweb, a name and a version (from the .app file), or
113 %% an application name, a version and the SCM details on how to fetch it (SCM
86753c4 @tuncer Cleanup rebar.config.sample
tuncer authored
114 %% type, location and revision). Rebar currently supports git, hg, bzr and svn.
5d78928 @dizzyd Fix bug 549; example deps in rebar.config.sample were wrong, as identifi...
dizzyd authored
115 {deps, [application_name,
cad24b2 @dizzyd Adding rebar.config.sample from vagabond (http://bitbucket.org/vagabond/...
dizzyd authored
116 {application_name, "1.0.*"},
86753c4 @tuncer Cleanup rebar.config.sample
tuncer authored
117 {application_name, "1.0.*",
03a026f @aschepis Add support for alternate dependency urls
aschepis authored
118 {git, "git://github.com/basho/rebar.git", {branch, "master"}}},
119 {application_name, "1.0.*",
120 {git, "git://github.com/basho/rebar.git", {branch, "master"}},
121 [{alt_url, "https://github.com/basho/rebar.git"}]}]}.
cad24b2 @dizzyd Adding rebar.config.sample from vagabond (http://bitbucket.org/vagabond/...
dizzyd authored
122
123 %% == Subdirectories ==
124
125 %% Subdirectories?
126 {sub_dirs, ["dir1", "dir2"]}.
e767705 @hyperthunk Add pre and post script support for all commands
hyperthunk authored
127
3b58935 @hyperthunk Load plugins dynamically from source
hyperthunk authored
128 %% == Plugins ==
129
130 %% Plugins you wish to include.
131 %% These can include any module on the code path, including deps.
132 %% Alternatively, plugins can be placed as source files in the plugin_dir, in
133 %% which case they will be compiled and loaded dynamically at runtime.
134 {plugins, [plugin1, plugin2]}.
135
136 %% Override the directory in which plugin sources can be found.
137 %% Defaults to ./plugins
138 {plugin_dir, "some_other_directory"}.
139
140
e767705 @hyperthunk Add pre and post script support for all commands
hyperthunk authored
141 %% == Pre/Post Command Hooks ==
142
143 {pre_hooks, [{clean, "./prepare_package_files.sh"},
8f4e80b @tuncer Update sample hooks config
tuncer authored
144 {"linux", compile, "c_src/build_linux.sh"},
145 {compile, "escript generate_headers"},
146 {compile, "escript check_headers"}]}.
e767705 @hyperthunk Add pre and post script support for all commands
hyperthunk authored
147
148 {post_hooks, [{clean, "touch file1.out"},
8f4e80b @tuncer Update sample hooks config
tuncer authored
149 {"freebsd", compile, "c_src/freebsd_tweaks.sh"},
e767705 @hyperthunk Add pre and post script support for all commands
hyperthunk authored
150 {eunit, "touch file2.out"},
151 {compile, "touch postcompile.out"}]}.
db706ab @tuncer Document xref options
tuncer authored
152
153 %% == xref ==
154
155 {xref_warnings, false}.
0191806 @xcurry Add support for custom xref queries
xcurry authored
156
db706ab @tuncer Document xref options
tuncer authored
157 %% xref checks to run
158 {xref_checks, [exports_not_used, undefined_function_calls]}.
0191806 @xcurry Add support for custom xref queries
xcurry authored
159
160 %% Optional custom xref queries (xref manual has details) specified as
161 %% {xref_queries, [{query_string(), expected_query_result()},...]}
162 %% The following for example removes all references to ejabberd:*_msg/4
163 %% functions from undefined external function calls as those are in a
164 %% generated module
165 {xref_queries,
0b8ca93 @tuncer Fix whitespace error
tuncer authored
166 [{"(XC - UC) || (XU - X - B"
167 " - (\"ejabberd_logger\":\".*_msg\"/\"4\"))",[]}]}.
Something went wrong with that request. Please try again.