Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

236 строки
7.2 KiB

14 лет назад
14 лет назад
14 лет назад
13 лет назад
13 лет назад
12 лет назад
12 лет назад
13 лет назад
13 лет назад
14 лет назад
14 лет назад
13 лет назад
  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. %% == escriptize ==
  53. {escript_name, "application"}.
  54. {escript_incl_apps, []}.
  55. {escript_shebang, "#!/usr/bin/env escript\n"}.
  56. {escript_comment, "%%\n"}.
  57. {escript_emu_args, "%%! -pa application/application/ebin\n"}.
  58. %% == LFE Compiler ==
  59. %% LFE files to compile before the rest
  60. {lfe_first_files, []}.
  61. %% Options for the LFE compiler: reuse {erl_opts, []}
  62. %% == ErlyDTL Compiler ==
  63. %% Options for the ErlyDTL compiler
  64. {erlydtl_opts, []}.
  65. %% == EUnit ==
  66. %% Options for eunit:test()
  67. {eunit_opts, []}.
  68. %% Additional compile options for eunit. erl_opts is also used
  69. {eunit_compile_opts, []}.
  70. %% Same as erl_first_files, but used only when running 'eunit'
  71. {eunit_first_files, []}.
  72. %% == Cover ==
  73. %% Whether to enable coverage reporting. Default is `false'
  74. {cover_enabled, false}.
  75. %% Whether to print coverage report to console. Default is `false'
  76. {cover_print_enabled, false}.
  77. %% Whether to export coverage report to file. Default is `false'
  78. {cover_export_enabled, false}.
  79. %% == Common Test ==
  80. %% Override the default "test" directory in which SUITEs are located
  81. {ct_dir, "itest"}.
  82. %% Override the default "logs" directory in which SUITEs are logged
  83. {ct_log_dir, "test/logs"}.
  84. %% Option to pass extra parameters when launching Common Test
  85. {ct_extra_params, "-boot start_sasl -s myapp"}.
  86. %% Option to use short names (i.e., -sname test) when starting ct
  87. {ct_use_short_names, true}.
  88. %% == QuickCheck ==
  89. %% If qc_mod is unspecified, rebar tries to detect Triq or EQC
  90. {qc_opts, [{qc_mod, module()}, Options]}.
  91. %% Additional compile options for qc. erl_opts is also used
  92. {qc_compile_opts, []}.
  93. %% Same as erl_first_files, but used only when running 'qc'
  94. {qc_first_files, []}.
  95. %% == Cleanup ==
  96. %% Which files to cleanup
  97. {clean_files, ["file", "file2"]}.
  98. %% == OTP Applications ==
  99. %% Enable validation of the OTP app module list. Default is 'true'
  100. {validate_app_modules, true}.
  101. %% == Dependencies ==
  102. %% Where to put any downloaded dependencies. Default is "deps"
  103. {deps_dir, "deps"}.
  104. %% What dependencies we have, dependencies can be of 3 forms, an application
  105. %% name as an atom, eg. mochiweb, a name and a version (from the .app file), or
  106. %% an application name, a version and the SCM details on how to fetch it (SCM
  107. %% type, location and revision).
  108. %% Rebar currently supports git, hg, bzr, svn, rsync, and fossil.
  109. {deps, [app_name,
  110. {rebar, "1.0.*"},
  111. {rebar, ".*",
  112. {git, "git://github.com/rebar/rebar.git"}},
  113. {rebar, ".*",
  114. {git, "git://github.com/rebar/rebar.git", "Rev"}},
  115. {rebar, "1.0.*",
  116. {git, "git://github.com/rebar/rebar.git", {branch, "master"}}},
  117. {rebar, "1.0.0",
  118. {git, "git://github.com/rebar/rebar.git", {tag, "1.0.0"}}},
  119. %% Dependencies can be marked as 'raw'. Rebar does not require
  120. %% such dependencies to have a standard Erlang/OTP layout
  121. %% which assumes the presence of either
  122. %% "src/dependency_name.app.src" or "ebin/dependency_name.app"
  123. %% files.
  124. %%
  125. %% 'raw' dependencies can still contain 'rebar.config' and
  126. %% even can have the proper OTP directory layout, but they
  127. %% won't be compiled.
  128. %%
  129. %% Only a subset of rebar commands will be executed on the
  130. %% 'raw' subdirectories: get-deps, update-deps, check-deps,
  131. %% list-deps and delete-deps.
  132. {rebar, "",
  133. {git, "git://github.com/rebar/rebar.git", {branch, "master"}},
  134. [raw]},
  135. {app_name, ".*", {hg, "https://www.example.org/url"}},
  136. {app_name, ".*", {rsync, "Url"}},
  137. {app_name, ".*", {svn, "https://www.example.org/url"}},
  138. {app_name, ".*", {svn, "svn://svn.example.org/url"}},
  139. {app_name, ".*", {bzr, "https://www.example.org/url", "Rev"}},
  140. {app_name, ".*", {fossil, "https://www.example.org/url"}},
  141. {app_name, ".*", {fossil, "https://www.example.org/url", "Vsn"}}]}.
  142. %% == Subdirectories ==
  143. %% Subdirectories?
  144. {sub_dirs, ["dir1", "dir2"]}.
  145. %% == Plugins ==
  146. %% Plugins you wish to include.
  147. %% These can include any module on the code path, including deps.
  148. %% Alternatively, plugins can be placed as source files in the plugin_dir, in
  149. %% which case they will be compiled and loaded dynamically at runtime.
  150. {plugins, [plugin1, plugin2]}.
  151. %% Override the directory in which plugin sources can be found.
  152. %% Defaults to ./plugins
  153. {plugin_dir, "some_other_directory"}.
  154. %% == Pre/Post Command Hooks ==
  155. {pre_hooks, [{clean, "./prepare_package_files.sh"},
  156. {"linux", compile, "c_src/build_linux.sh"},
  157. {compile, "escript generate_headers"},
  158. {compile, "escript check_headers"}]}.
  159. {post_hooks, [{clean, "touch file1.out"},
  160. {"freebsd", compile, "c_src/freebsd_tweaks.sh"},
  161. {eunit, "touch file2.out"},
  162. {compile, "touch postcompile.out"}]}.
  163. %% == xref ==
  164. {xref_warnings, false}.
  165. %% xref checks to run
  166. {xref_checks, [undefined_function_calls, undefined_functions,
  167. locals_not_used, exports_not_used,
  168. deprecated_function_calls, deprecated_functions]}.
  169. %% Optional custom xref queries (xref manual has details) specified as
  170. %% {xref_queries, [{query_string(), expected_query_result()},...]}
  171. %% The following for example removes all references to mod:*foo/4
  172. %% functions from undefined external function calls as those are in a
  173. %% generated module
  174. {xref_queries,
  175. [{"(XC - UC) || (XU - X - B"
  176. " - (\"mod\":\".*foo\"/\"4\"))",[]}]}.