Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

179 Zeilen
5.2 KiB

vor 14 Jahren
vor 14 Jahren
  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. %% Additional compile options for test-compile. erl_opts is also used
  20. {test_compile_opts, []}.
  21. %% Same as erl_first_files, but used only when running 'test-compile', 'eunit',
  22. %% or 'qc'
  23. {test_first_files, []}.
  24. %% MIB Options?
  25. {mib_opts, []}.
  26. %% SNMP mibs to compile first?
  27. {mib_first_files, []}.
  28. %% == EDoc ==
  29. %% EDoc options
  30. {edoc_opts, []}.
  31. %% == Port Compiler ==
  32. %% Port compilation environment variables. See rebar_port_compiler.erl for
  33. %% more info. Default is `[]'
  34. {port_env, [{"CFLAGS", "$CFLAGS -Ifoo"},
  35. {"freebsd", "LDFLAGS", "$LDFLAGS -lfoo"}]}.
  36. %% port_specs
  37. %% List of filenames or wildcards to be compiled. May also contain a tuple
  38. %% consisting of a regular expression to be applied against the system
  39. %% architecture as a filter.
  40. {port_specs, [{"priv/so_name.so", ["c_src/*.c"]},
  41. {"linux", "priv/hello_linux", ["c_src/hello_linux.c"]},
  42. {"linux", "priv/hello_linux", ["c_src/*.c"], [{env, []}]}}.
  43. %% == LFE Compiler ==
  44. %% LFE files to compile before the rest
  45. {lfe_first_files, []}.
  46. %% Options for the LFE compiler: reuse {erl_opts, []}
  47. %% == ErlyDTL Compiler ==
  48. %% Options for the ErlyDTL compiler
  49. {erlydtl_opts, []}.
  50. %% == EUnit ==
  51. %% Options for eunit:test()
  52. {eunit_opts, []}.
  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. %% == Cleanup ==
  72. %% Which files to cleanup
  73. {clean_files, ["file", "file2"]}.
  74. %% == Reltool ==
  75. %% Target directory for the release
  76. {target, "target"}.
  77. %% == OTP Applications ==
  78. %% Binaries to link into the erlang path?
  79. {app_bin, []}.
  80. %% Enable validation of the OTP app module list. Default is 'true'
  81. {validate_app_modules, true}.
  82. %% == Dependencies ==
  83. %% Where to put any downloaded dependencies. Default is "deps"
  84. {deps_dir, "deps"}.
  85. %% What dependencies we have, dependencies can be of 3 forms, an application
  86. %% name as an atom, eg. mochiweb, a name and a version (from the .app file), or
  87. %% an application name, a version and the SCM details on how to fetch it (SCM
  88. %% type, location and revision). Rebar currently supports git, hg, bzr and svn.
  89. {deps, [application_name,
  90. {application_name, "1.0.*"},
  91. {application_name, "1.0.*",
  92. {git, "git://github.com/basho/rebar.git", {branch, "master"}}}]}.
  93. %% == Subdirectories ==
  94. %% Subdirectories?
  95. {sub_dirs, ["dir1", "dir2"]}.
  96. %% == Plugins ==
  97. %% Plugins you wish to include.
  98. %% These can include any module on the code path, including deps.
  99. %% Alternatively, plugins can be placed as source files in the plugin_dir, in
  100. %% which case they will be compiled and loaded dynamically at runtime.
  101. {plugins, [plugin1, plugin2]}.
  102. %% Override the directory in which plugin sources can be found.
  103. %% Defaults to ./plugins
  104. {plugin_dir, "some_other_directory"}.
  105. %% == Pre/Post Command Hooks ==
  106. {pre_hooks, [{clean, "./prepare_package_files.sh"},
  107. {"linux", compile, "c_src/build_linux.sh"},
  108. {compile, "escript generate_headers"},
  109. {compile, "escript check_headers"}]}.
  110. {post_hooks, [{clean, "touch file1.out"},
  111. {"freebsd", compile, "c_src/freebsd_tweaks.sh"},
  112. {eunit, "touch file2.out"},
  113. {compile, "touch postcompile.out"}]}.
  114. %% == xref ==
  115. {xref_warnings, false}.
  116. %% xref checks to run
  117. {xref_checks, [exports_not_used, undefined_function_calls]}.
  118. %% Optional custom xref queries (xref manual has details) specified as
  119. %% {xref_queries, [{query_string(), expected_query_result()},...]}
  120. %% The following for example removes all references to ejabberd:*_msg/4
  121. %% functions from undefined external function calls as those are in a
  122. %% generated module
  123. {xref_queries,
  124. [{"(XC - UC) || (XU - X - B"
  125. " - (\"ejabberd_logger\":\".*_msg\"/\"4\"))",[]}]}.