Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

187 рядки
5.3 KiB

14 роки тому
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. %% Additional library directories to add to the code path
  7. {lib_dirs, []}.
  8. %% == Erlang Compiler ==
  9. %% Erlang files to compile before the rest. Rebar automatically compiles
  10. %% parse_transforms and custom behaviours before anything other than the files
  11. %% in this list.
  12. {erl_first_files, ["mymib1", "mymib2"]}.
  13. %% Erlang compiler options
  14. {erl_opts, [no_debug_info, {i, "myinclude"}, {src_dirs, ["src1", "src2"]},
  15. {platform_define,
  16. "(linux|solaris|freebsd|darwin)", 'HAVE_SENDFILE'},
  17. {platform_define, "(linux|freebsd)", 'BACKLOG', 128},
  18. {platform_define, "R13", 'old_inets'}]}.
  19. %% MIB Options?
  20. {mib_opts, []}.
  21. %% SNMP mibs to compile first?
  22. {mib_first_files, []}.
  23. %% == EDoc ==
  24. %% EDoc options
  25. {edoc_opts, []}.
  26. %% == Port Compiler ==
  27. %% Port compilation environment variables. See rebar_port_compiler.erl for
  28. %% more info. Default is `[]'
  29. {port_env, [{"CFLAGS", "$CFLAGS -Ifoo"},
  30. {"freebsd", "LDFLAGS", "$LDFLAGS -lfoo"}]}.
  31. %% port_specs
  32. %% List of filenames or wildcards to be compiled. May also contain a tuple
  33. %% consisting of a regular expression to be applied against the system
  34. %% architecture as a filter.
  35. {port_specs, [{"priv/so_name.so", ["c_src/*.c"]},
  36. {"linux", "priv/hello_linux", ["c_src/hello_linux.c"]},
  37. {"linux", "priv/hello_linux", ["c_src/*.c"], [{env, []}]}}.
  38. %% == LFE Compiler ==
  39. %% LFE files to compile before the rest
  40. {lfe_first_files, []}.
  41. %% Options for the LFE compiler: reuse {erl_opts, []}
  42. %% == ErlyDTL Compiler ==
  43. %% Options for the ErlyDTL compiler
  44. {erlydtl_opts, []}.
  45. %% == EUnit ==
  46. %% Options for eunit:test()
  47. {eunit_opts, []}.
  48. %% Additional compile options for eunit. erl_opts is also used
  49. {eunit_compile_opts, []}.
  50. %% Same as erl_first_files, but used only when running 'eunit'
  51. {eunit_first_files, []}.
  52. %% == Cover ==
  53. %% Whether to enable coverage reporting. Default is `false'
  54. {cover_enabled, false}.
  55. %% Whether to print coverage report to console. Default is `false'
  56. {cover_print_enabled, false}.
  57. %% Whether to export coverage report to file. Default is `false'
  58. {cover_export_enabled, false}.
  59. %% == Common Test ==
  60. %% Override the default "test" directory in which SUITEs are located
  61. {ct_dir, "itest"}.
  62. %% Override the default "logs" directory in which SUITEs are logged
  63. {ct_log_dir, "test/logs"}.
  64. %% Option to pass extra parameters when launching Common Test
  65. {ct_extra_params, "-boot start_sasl -s myapp"}.
  66. %% Option to use short names (i.e., -sname test) when starting ct
  67. {ct_use_short_names, true}.
  68. %% == QuickCheck ==
  69. %% If qc_mod is unspecified, rebar tries to detect Triq or EQC
  70. {qc_opts, [{qc_mod, module()}, Options]}.
  71. %% Additional compile options for qc. erl_opts is also used
  72. {qc_compile_opts, []}.
  73. %% Same as erl_first_files, but used only when running 'qc'
  74. {qc_first_files, []}.
  75. %% == Cleanup ==
  76. %% Which files to cleanup
  77. {clean_files, ["file", "file2"]}.
  78. %% == Reltool ==
  79. %% Target directory for the release
  80. {target, "target"}.
  81. %% == OTP Applications ==
  82. %% Binaries to link into the erlang path?
  83. {app_bin, []}.
  84. %% Enable validation of the OTP app module list. Default is 'true'
  85. {validate_app_modules, true}.
  86. %% == Dependencies ==
  87. %% Where to put any downloaded dependencies. Default is "deps"
  88. {deps_dir, "deps"}.
  89. %% What dependencies we have, dependencies can be of 3 forms, an application
  90. %% name as an atom, eg. mochiweb, a name and a version (from the .app file), or
  91. %% an application name, a version and the SCM details on how to fetch it (SCM
  92. %% type, location and revision).
  93. %% Rebar currently supports git, hg, bzr, svn, and rsync.
  94. {deps, [application_name,
  95. {application_name, "1.0.*"},
  96. {application_name, "1.0.*",
  97. {git, "git://github.com/basho/rebar.git", {branch, "master"}}}]}.
  98. %% == Subdirectories ==
  99. %% Subdirectories?
  100. {sub_dirs, ["dir1", "dir2"]}.
  101. %% == Plugins ==
  102. %% Plugins you wish to include.
  103. %% These can include any module on the code path, including deps.
  104. %% Alternatively, plugins can be placed as source files in the plugin_dir, in
  105. %% which case they will be compiled and loaded dynamically at runtime.
  106. {plugins, [plugin1, plugin2]}.
  107. %% Override the directory in which plugin sources can be found.
  108. %% Defaults to ./plugins
  109. {plugin_dir, "some_other_directory"}.
  110. %% == Pre/Post Command Hooks ==
  111. {pre_hooks, [{clean, "./prepare_package_files.sh"},
  112. {"linux", compile, "c_src/build_linux.sh"},
  113. {compile, "escript generate_headers"},
  114. {compile, "escript check_headers"}]}.
  115. {post_hooks, [{clean, "touch file1.out"},
  116. {"freebsd", compile, "c_src/freebsd_tweaks.sh"},
  117. {eunit, "touch file2.out"},
  118. {compile, "touch postcompile.out"}]}.
  119. %% == xref ==
  120. {xref_warnings, false}.
  121. %% xref checks to run
  122. {xref_checks, [exports_not_used, undefined_function_calls]}.
  123. %% Optional custom xref queries (xref manual has details) specified as
  124. %% {xref_queries, [{query_string(), expected_query_result()},...]}
  125. %% The following for example removes all references to ejabberd:*_msg/4
  126. %% functions from undefined external function calls as those are in a
  127. %% generated module
  128. {xref_queries,
  129. [{"(XC - UC) || (XU - X - B"
  130. " - (\"ejabberd_logger\":\".*_msg\"/\"4\"))",[]}]}.