Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

219 linhas
6.3 KiB

  1. %% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
  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. %% == Core ==
  6. %% Check required ERTS or OTP release version
  7. {require_erts_vsn, ".*"}.
  8. {require_otp_vsn, ".*"}.
  9. {require_min_otp_vsn, ".*"}.
  10. %% Additional library directories to add to the code path
  11. {lib_dirs, []}.
  12. %% == Erlang Compiler ==
  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. %% Erlang compiler options
  18. {erl_opts, [no_debug_info,
  19. {i, "myinclude"},
  20. {src_dirs, ["src", "src2", "src3"]},
  21. {platform_define,
  22. "(linux|solaris|freebsd|darwin)", 'HAVE_SENDFILE'},
  23. {platform_define, "(linux|freebsd)", 'BACKLOG', 128},
  24. {platform_define, "R13", 'old_inets'}]}.
  25. %% MIB Options?
  26. {mib_opts, []}.
  27. %% SNMP mibs to compile first?
  28. {mib_first_files, []}.
  29. %% leex options
  30. {xrl_opts, []}.
  31. %% leex files to compile first
  32. {xrl_first_files, []}.
  33. %% yecc options
  34. {yrl_opts, []}.
  35. %% yecc files to compile first
  36. {yrl_first_files, []}.
  37. %% == EDoc ==
  38. %% EDoc options
  39. {edoc_opts, []}.
  40. %% == Port Compiler ==
  41. %% Port compilation environment variables. See rebar_port_compiler.erl for
  42. %% more info. Default is `[]'
  43. {port_env, [{"CFLAGS", "$CFLAGS -Ifoo"},
  44. {"freebsd", "LDFLAGS", "$LDFLAGS -lfoo"}]}.
  45. %% port_specs
  46. %% List of filenames or wildcards to be compiled. May also contain a tuple
  47. %% consisting of a regular expression to be applied against the system
  48. %% architecture as a filter.
  49. {port_specs, [{"priv/so_name.so", ["c_src/*.c"]},
  50. {"linux", "priv/hello_linux", ["c_src/hello_linux.c"]},
  51. {"linux", "priv/hello_linux", ["c_src/*.c"], [{env, []}]}]}.
  52. %% == LFE Compiler ==
  53. %% LFE files to compile before the rest
  54. {lfe_first_files, []}.
  55. %% Options for the LFE compiler: reuse {erl_opts, []}
  56. %% == ErlyDTL Compiler ==
  57. %% Options for the ErlyDTL compiler
  58. {erlydtl_opts, []}.
  59. %% == EUnit ==
  60. %% Options for eunit:test()
  61. {eunit_opts, []}.
  62. %% Additional compile options for eunit. erl_opts is also used
  63. {eunit_compile_opts, []}.
  64. %% Same as erl_first_files, but used only when running 'eunit'
  65. {eunit_first_files, []}.
  66. %% == Cover ==
  67. %% Whether to enable coverage reporting. Default is `false'
  68. {cover_enabled, false}.
  69. %% Whether to print coverage report to console. Default is `false'
  70. {cover_print_enabled, false}.
  71. %% Whether to export coverage report to file. Default is `false'
  72. {cover_export_enabled, false}.
  73. %% == Common Test ==
  74. %% Override the default "test" directory in which SUITEs are located
  75. {ct_dir, "itest"}.
  76. %% Override the default "logs" directory in which SUITEs are logged
  77. {ct_log_dir, "test/logs"}.
  78. %% Option to pass extra parameters when launching Common Test
  79. {ct_extra_params, "-boot start_sasl -s myapp"}.
  80. %% Option to use short names (i.e., -sname test) when starting ct
  81. {ct_use_short_names, true}.
  82. %% == QuickCheck ==
  83. %% If qc_mod is unspecified, rebar tries to detect Triq or EQC
  84. {qc_opts, [{qc_mod, module()}, Options]}.
  85. %% Additional compile options for qc. erl_opts is also used
  86. {qc_compile_opts, []}.
  87. %% Same as erl_first_files, but used only when running 'qc'
  88. {qc_first_files, []}.
  89. %% == Cleanup ==
  90. %% Which files to cleanup
  91. {clean_files, ["file", "file2"]}.
  92. %% == Reltool ==
  93. %% Target directory for the release
  94. {target, "target"}.
  95. %% == OTP Applications ==
  96. %% Enable validation of the OTP app module list. Default is 'true'
  97. {validate_app_modules, true}.
  98. %% == Dependencies ==
  99. %% Where to put any downloaded dependencies. Default is "deps"
  100. {deps_dir, "deps"}.
  101. %% What dependencies we have, dependencies can be of 3 forms, an application
  102. %% name as an atom, eg. mochiweb, a name and a version (from the .app file), or
  103. %% an application name, a version and the SCM details on how to fetch it (SCM
  104. %% type, location and revision).
  105. %% Rebar currently supports git, hg, bzr, svn, and rsync.
  106. {deps, [application_name,
  107. {application_name, "1.0.*"},
  108. {application_name, "1.0.*",
  109. {git, "git://github.com/basho/rebar.git", {branch, "master"}}},
  110. %% Dependencies can be marked as 'raw'. Rebar does not require
  111. %% such dependencies to have a standard Erlang/OTP layout
  112. %% which assumes the presence of either
  113. %% "src/dependency_name.app.src" or "ebin/dependency_name.app"
  114. %% files.
  115. %%
  116. %% 'raw' dependencies can still contain 'rebar.config' and
  117. %% even can have the proper OTP directory layout, but they
  118. %% won't be compiled.
  119. %%
  120. %% Only a subset of rebar commands will be executed on the
  121. %% 'raw' subdirectories: get-deps, update-deps, check-deps,
  122. %% list-deps and delete-deps.
  123. {application_name, "",
  124. {git, "git://github.com/basho/rebar.git", {branch, "master"}},
  125. [raw]}]}.
  126. %% == Subdirectories ==
  127. %% Subdirectories?
  128. {sub_dirs, ["dir1", "dir2"]}.
  129. %% == Plugins ==
  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. %% Override the directory in which plugin sources can be found.
  136. %% Defaults to ./plugins
  137. {plugin_dir, "some_other_directory"}.
  138. %% == Pre/Post Command Hooks ==
  139. {pre_hooks, [{clean, "./prepare_package_files.sh"},
  140. {"linux", compile, "c_src/build_linux.sh"},
  141. {compile, "escript generate_headers"},
  142. {compile, "escript check_headers"}]}.
  143. {post_hooks, [{clean, "touch file1.out"},
  144. {"freebsd", compile, "c_src/freebsd_tweaks.sh"},
  145. {eunit, "touch file2.out"},
  146. {compile, "touch postcompile.out"}]}.
  147. %% == xref ==
  148. {xref_warnings, false}.
  149. %% xref checks to run
  150. {xref_checks, [exports_not_used, undefined_function_calls]}.
  151. %% Optional custom xref queries (xref manual has details) specified as
  152. %% {xref_queries, [{query_string(), expected_query_result()},...]}
  153. %% The following for example removes all references to ejabberd:*_msg/4
  154. %% functions from undefined external function calls as those are in a
  155. %% generated module
  156. {xref_queries,
  157. [{"(XC - UC) || (XU - X - B"
  158. " - (\"ejabberd_logger\":\".*_msg\"/\"4\"))",[]}]}.