2010-06-03 19:36:48 +00:00
|
|
|
%% -*- tab-width: 4;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, []}.
|
|
|
|
|
2010-11-21 20:40:14 +00:00
|
|
|
%% Command to run before compiling
|
|
|
|
{compile_pre_script, "./script.sh"}.
|
|
|
|
|
|
|
|
%% Command to run after compiling
|
|
|
|
{compile_post_script, "./script.sh"}.
|
|
|
|
|
|
|
|
%% Command to run before cleaning
|
|
|
|
{clean_pre_script, "./script.sh"}.
|
|
|
|
|
|
|
|
%% Command to run after cleaning
|
|
|
|
{clean_post_script, "./script.sh"}.
|
|
|
|
|
2010-06-03 19:36:48 +00:00
|
|
|
%% == 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
|
2010-06-12 11:38:59 +00:00
|
|
|
{erl_opts, [{i, "myinclude"}, {src_dirs, ["src1", "src2"]},
|
|
|
|
{platform_define,
|
|
|
|
"(linux|solaris|freebsd|darwin)", 'HAVE_SENDFILE'},
|
|
|
|
{platform_define, "(linux|freebsd)", 'BACKLOG', 128}]}.
|
2010-06-03 19:36:48 +00:00
|
|
|
|
|
|
|
%% MIB Options?
|
|
|
|
{mib_opts, []}.
|
|
|
|
|
|
|
|
%% SNMP mibs to compile first?
|
|
|
|
{mib_first_files, []}.
|
|
|
|
|
2010-11-19 19:03:12 +00:00
|
|
|
%% == EDoc ==
|
|
|
|
|
|
|
|
%% EDoc options
|
|
|
|
{edoc_opts, []}.
|
|
|
|
|
2010-06-03 19:36:48 +00:00
|
|
|
%% == Port Compiler ==
|
|
|
|
|
|
|
|
%% List and wildcard list of files to be compiled. Default is `"c_src/*.c"'
|
|
|
|
{port_sources, []}.
|
|
|
|
|
|
|
|
%% Port compilation environment variables. See rebar_port_compiler.erl for
|
|
|
|
%% more info. Default is `[]'
|
|
|
|
{port_envs, []}.
|
|
|
|
|
|
|
|
%% Tuple which specifies a pre-compilation script to run, and a filename that
|
|
|
|
%% exists as a result of the script running.
|
|
|
|
{port_pre_script, {"script.sh", "skipfile"}}.
|
|
|
|
|
|
|
|
%% String that specifies a script to run during cleanup. Use this to remove
|
|
|
|
%% files/directories created by port_pre_script.
|
|
|
|
{port_cleanup_script, "cleanup.sh"}.
|
|
|
|
|
|
|
|
%% Custom name of the port driver .so file. Defaults to `<Application>_drv.so'.
|
|
|
|
{so_name, "driver.so"}.
|
|
|
|
|
|
|
|
%% == LFE Compiler ==
|
|
|
|
|
|
|
|
%% LFE files to compile before the rest
|
|
|
|
{lfe_first_files, []}.
|
|
|
|
|
|
|
|
%% Options for the LFE compiler
|
|
|
|
{lfe_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, []}.
|
|
|
|
|
|
|
|
%% Whether to enable coverage reporting. Default is `false'
|
|
|
|
{cover_enabled, false}.
|
2010-10-06 19:05:13 +00:00
|
|
|
|
|
|
|
%% Whether to print coverage report to console. Default is `false'
|
|
|
|
{cover_print_enabled, false}.
|
2010-06-03 19:36:48 +00:00
|
|
|
|
|
|
|
%% == Dialyzer ==
|
|
|
|
|
2010-10-25 20:07:32 +00:00
|
|
|
%% Options for running dialyzer
|
|
|
|
%% {plt, PltFile}
|
|
|
|
%% 'src': run Dialyzer on the source files as in 'dialyzer --src'
|
|
|
|
%% {warnings, [WarnOpts]}: turn on/off Dialyzer warnings
|
2010-11-20 22:31:35 +00:00
|
|
|
{dialyzer_opts, [{plt, PltFile}, {warnings, [WarnOpts]}, src]}.
|
2010-06-03 19:36:48 +00:00
|
|
|
|
|
|
|
%% == 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, []}.
|
|
|
|
|
2010-10-10 20:23:17 +00:00
|
|
|
%% Enable validation of the OTP app module list. Default is 'true'
|
|
|
|
{validate_app_modules, true}.
|
|
|
|
|
2010-06-03 19:36:48 +00:00
|
|
|
%% == Dependancies ==
|
|
|
|
|
|
|
|
%% 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 support git, hg, bzr and svn.
|
2010-08-20 13:13:37 +00:00
|
|
|
{deps, [application_name,
|
2010-06-03 19:36:48 +00:00
|
|
|
{application_name, "1.0.*"},
|
2010-08-20 13:13:37 +00:00
|
|
|
{application_name, "1.0.*", {hg, "http://bitbucket.org/basho/rebar/", "f3626d5858a6"}}]}.
|
2010-06-03 19:36:48 +00:00
|
|
|
|
|
|
|
%% == Subdirectories ==
|
|
|
|
|
|
|
|
%% Subdirectories?
|
|
|
|
{sub_dirs, ["dir1", "dir2"]}.
|