- %% -*- 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.
-
- %% == 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, "myinclude"},
- %% directories containing source files
- {src_dirs, ["src", "src2", "src3"]},
- %% extra_src_dirs are directories containing
- %% source files that are NOT part of the
- %% application itself
- {extra_src_dirs, ["eunit", "ct"]},
- {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, []}.
-
- %% == 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"}.
-
- %% == ErlyDTL Compiler ==
-
- %% Options for the ErlyDTL compiler
- {erlydtl_opts, []}.
-
- %% == EUnit ==
-
- %% Options for eunit:test()
- {eunit_opts, []}.
-
- %% Additional compile options for eunit. erl_opts is also used
- {eunit_compile_opts, []}.
-
- %% Files to compile first when compiling eunit test suites
- {eunit_first_files, []}.
-
- %% == Common Test ==
-
- %% Options to pass to ct:run_test/1
- {ct_opts, [{logdir, "logs"}, {dir, "test"}]}.
-
- %% Additional compile options for ct. erl_opts is also used
- {ct_compile_opts, []}.
-
- %% Files to compile first when compiling ct test suites
- {ct_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}.
-
- %% Directory to store collected cover data
- {cover_data_dir, "cover"}.
-
- %% 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).
- %% Rebar3 currently supports git and hg
- {deps, [app_name,
- {rebar, "1.0.*"},
- {rebar, ".*",
- {git, "git://github.com/rebar/rebar.git"}},
- {rebar, ".*",
- {git, "git://github.com/rebar/rebar.git", "Rev"}},
- {rebar, "1.0.*",
- {git, "git://github.com/rebar/rebar.git", {branch, "master"}}},
- {rebar, "1.0.0",
- {git, "git://github.com/rebar/rebar.git", {tag, "1.0.0"}}},
- {rebar, ".*",
- {git, "git://github.com/rebar/rebar.git", {ref, "7f73b8d3650b41ffd53a199f3eda20985eda84e3"}}},
- {app_name, ".*", {hg, "https://www.example.org/url"}}]}.
-
- %% == 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"}]}.
-
- %% == 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]}.
-
- %% Optional custom xref queries (xref manual has details) specified as
- %% {xref_queries, [{query_string(), expected_query_result()},...]}
- %% The following for example removes all references to mod:*foo/4
- %% functions from undefined external function calls as those are in a
- %% generated module
- {xref_queries,
- [{"(XC - UC) || (XU - X - B"
- " - (\"mod\":\".*foo\"/\"4\"))",[]}]}.
|