You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

221 lines
6.5 KiB

преди 14 години
преди 14 години
преди 14 години
преди 12 години
преди 14 години
преди 12 години
преди 12 години
преди 14 години
преди 14 години
преди 13 години
преди 13 години
преди 14 години
преди 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 ~s/~s/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, and rsync.
  109. {deps, [application_name,
  110. {application_name, "1.0.*"},
  111. {application_name, "1.0.*",
  112. {git, "git://github.com/basho/rebar.git", {branch, "master"}}},
  113. %% Dependencies can be marked as 'raw'. Rebar does not require
  114. %% such dependencies to have a standard Erlang/OTP layout
  115. %% which assumes the presence of either
  116. %% "src/dependency_name.app.src" or "ebin/dependency_name.app"
  117. %% files.
  118. %%
  119. %% 'raw' dependencies can still contain 'rebar.config' and
  120. %% even can have the proper OTP directory layout, but they
  121. %% won't be compiled.
  122. %%
  123. %% Only a subset of rebar commands will be executed on the
  124. %% 'raw' subdirectories: get-deps, update-deps, check-deps,
  125. %% list-deps and delete-deps.
  126. {application_name, "",
  127. {git, "git://github.com/basho/rebar.git", {branch, "master"}},
  128. [raw]}]}.
  129. %% == Subdirectories ==
  130. %% Subdirectories?
  131. {sub_dirs, ["dir1", "dir2"]}.
  132. %% == Plugins ==
  133. %% Plugins you wish to include.
  134. %% These can include any module on the code path, including deps.
  135. %% Alternatively, plugins can be placed as source files in the plugin_dir, in
  136. %% which case they will be compiled and loaded dynamically at runtime.
  137. {plugins, [plugin1, plugin2]}.
  138. %% Override the directory in which plugin sources can be found.
  139. %% Defaults to ./plugins
  140. {plugin_dir, "some_other_directory"}.
  141. %% == Pre/Post Command Hooks ==
  142. {pre_hooks, [{clean, "./prepare_package_files.sh"},
  143. {"linux", compile, "c_src/build_linux.sh"},
  144. {compile, "escript generate_headers"},
  145. {compile, "escript check_headers"}]}.
  146. {post_hooks, [{clean, "touch file1.out"},
  147. {"freebsd", compile, "c_src/freebsd_tweaks.sh"},
  148. {eunit, "touch file2.out"},
  149. {compile, "touch postcompile.out"}]}.
  150. %% == xref ==
  151. {xref_warnings, false}.
  152. %% xref checks to run
  153. {xref_checks, [exports_not_used, undefined_function_calls]}.
  154. %% Optional custom xref queries (xref manual has details) specified as
  155. %% {xref_queries, [{query_string(), expected_query_result()},...]}
  156. %% The following for example removes all references to ejabberd:*_msg/4
  157. %% functions from undefined external function calls as those are in a
  158. %% generated module
  159. {xref_queries,
  160. [{"(XC - UC) || (XU - X - B"
  161. " - (\"ejabberd_logger\":\".*_msg\"/\"4\"))",[]}]}.