2011-01-31 16:43:31 +00:00
|
|
|
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
|
2010-06-03 19:36:48 +00:00
|
|
|
%% 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
|
2011-03-29 11:44:02 +00:00
|
|
|
{erl_opts, [no_debug_info, {i, "myinclude"}, {src_dirs, ["src1", "src2"]},
|
2010-06-12 11:38:59 +00:00
|
|
|
{platform_define,
|
2012-01-29 17:17:48 +00:00
|
|
|
"(linux|solaris|freebsd|darwin)", 'HAVE_SENDFILE'},
|
2011-01-09 15:06:51 +00:00
|
|
|
{platform_define, "(linux|freebsd)", 'BACKLOG', 128},
|
|
|
|
{platform_define, "R13", 'old_inets'}]}.
|
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 ==
|
|
|
|
|
|
|
|
%% Port compilation environment variables. See rebar_port_compiler.erl for
|
|
|
|
%% more info. Default is `[]'
|
|
|
|
{port_envs, []}.
|
|
|
|
|
2012-01-03 17:59:36 +00:00
|
|
|
%% port_specs
|
|
|
|
%% 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 as a filter.
|
|
|
|
{port_specs, [{"priv/so_name.so", ["c_src/*.c"]},
|
|
|
|
{"linux", "priv/hello_linux", ["c_src/hello_linux.c"]]}.
|
2011-04-30 13:09:46 +00:00
|
|
|
|
2010-06-03 19:36:48 +00:00
|
|
|
%% == LFE Compiler ==
|
|
|
|
|
|
|
|
%% LFE files to compile before the rest
|
|
|
|
{lfe_first_files, []}.
|
|
|
|
|
2011-04-11 12:08:39 +00:00
|
|
|
%% Options for the LFE compiler: reuse {erl_opts, []}
|
2010-06-03 19:36:48 +00:00
|
|
|
|
|
|
|
%% == 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, []}.
|
|
|
|
|
2011-02-13 17:11:29 +00:00
|
|
|
%% Same as erl_first_files, but used only when running 'eunit'
|
|
|
|
{eunit_first_files, []}.
|
|
|
|
|
2010-06-03 19:36:48 +00:00
|
|
|
%% 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
|
|
|
|
2011-04-06 15:47:29 +00:00
|
|
|
%% == Common Test ==
|
|
|
|
|
2011-09-18 12:38:31 +00:00
|
|
|
%% Override the default "test" directory in which SUITEs are located
|
|
|
|
{ct_dir, "itest"}.
|
|
|
|
|
2011-04-06 15:47:29 +00:00
|
|
|
%% Option to pass extra parameters when launching Common Test
|
|
|
|
{ct_extra_params, "-boot start_sasl -s myapp"}.
|
|
|
|
|
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}.
|
|
|
|
|
2011-03-12 15:28:40 +00:00
|
|
|
%% == Dependencies ==
|
2010-06-03 19:36:48 +00:00
|
|
|
|
2011-10-26 15:11:03 +00:00
|
|
|
%% Where to put any downloaded dependencies. Default is "deps"
|
|
|
|
{deps_dir, "deps"}.
|
2010-06-03 19:36:48 +00:00
|
|
|
|
2011-08-22 02:37:04 +00:00
|
|
|
%% What dependencies we have, dependencies can be of 3 forms, an application
|
2010-06-03 19:36:48 +00:00
|
|
|
%% 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
|
2011-03-12 15:28:40 +00:00
|
|
|
%% type, location and revision). Rebar currently supports 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.*"},
|
2011-03-12 15:28:40 +00:00
|
|
|
{application_name, "1.0.*",
|
|
|
|
{git, "git://github.com/basho/rebar.git", {branch, "master"}}}]}.
|
2010-06-03 19:36:48 +00:00
|
|
|
|
|
|
|
%% == Subdirectories ==
|
|
|
|
|
|
|
|
%% Subdirectories?
|
|
|
|
{sub_dirs, ["dir1", "dir2"]}.
|
2011-01-26 01:50:33 +00:00
|
|
|
|
2011-05-02 23:15:19 +00:00
|
|
|
%% == 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"}.
|
|
|
|
|
|
|
|
|
2011-01-26 01:50:33 +00:00
|
|
|
%% == Pre/Post Command Hooks ==
|
|
|
|
|
|
|
|
{pre_hooks, [{clean, "./prepare_package_files.sh"},
|
2011-12-05 13:16:56 +00:00
|
|
|
{"linux", compile, "c_src/build_linux.sh"},
|
|
|
|
{compile, "escript generate_headers"},
|
|
|
|
{compile, "escript check_headers"}]}.
|
2011-01-26 01:50:33 +00:00
|
|
|
|
|
|
|
{post_hooks, [{clean, "touch file1.out"},
|
2011-12-05 13:16:56 +00:00
|
|
|
{"freebsd", compile, "c_src/freebsd_tweaks.sh"},
|
2011-01-26 01:50:33 +00:00
|
|
|
{eunit, "touch file2.out"},
|
|
|
|
{compile, "touch postcompile.out"}]}.
|
2011-04-06 17:04:52 +00:00
|
|
|
|
|
|
|
%% == xref ==
|
|
|
|
|
|
|
|
{xref_warnings, false}.
|
|
|
|
%% xref checks to run
|
|
|
|
{xref_checks, [exports_not_used, undefined_function_calls]}.
|