您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

152 行
4.2 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. %% 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. %% List of filenames or wildcards to be compiled. May also contain a tuple
  28. %% consisting of a regular expression to be applied against the system
  29. %% architecture and a list of filenames or wildcards to include should the
  30. %% expression pass. Default is `"c_src/*.c"'
  31. {port_sources, ["c_src/*.c", {"R14", ["c_src/*.c"]}]}.
  32. %% Port compilation environment variables. See rebar_port_compiler.erl for
  33. %% more info. Default is `[]'
  34. {port_envs, []}.
  35. %% Custom name of the port driver .so file. Defaults to `<Application>_drv.so'.
  36. {so_name, "driver.so"}.
  37. %% so_specs - useful for building multiple *.so files
  38. %% from one or more object files
  39. {so_specs, [{"priv/so_name.so", ["c_src/object_file_name.o"]}]}.
  40. %% == LFE Compiler ==
  41. %% LFE files to compile before the rest
  42. {lfe_first_files, []}.
  43. %% Options for the LFE compiler: reuse {erl_opts, []}
  44. %% == ErlyDTL Compiler ==
  45. %% Options for the ErlyDTL compiler
  46. {erlydtl_opts, []}.
  47. %% == EUnit ==
  48. %% Options for eunit:test()
  49. {eunit_opts, []}.
  50. %% Additional compile options for eunit. erl_opts from above is also used
  51. {eunit_compile_opts, []}.
  52. %% Same as erl_first_files, but used only when running 'eunit'
  53. {eunit_first_files, []}.
  54. %% Whether to enable coverage reporting. Default is `false'
  55. {cover_enabled, false}.
  56. %% Whether to print coverage report to console. Default is `false'
  57. {cover_print_enabled, false}.
  58. %% == Common Test ==
  59. %% Option to pass extra parameters when launching Common Test
  60. {ct_extra_params, "-boot start_sasl -s myapp"}.
  61. %% == Cleanup ==
  62. %% Which files to cleanup
  63. {clean_files, ["file", "file2"]}.
  64. %% == Reltool ==
  65. %% Target directory for the release
  66. {target, "target"}.
  67. %% == OTP Applications ==
  68. %% Binaries to link into the erlang path?
  69. {app_bin, []}.
  70. %% Enable validation of the OTP app module list. Default is 'true'
  71. {validate_app_modules, true}.
  72. %% == Dependencies ==
  73. %% Where to put any downloaded dependencies. Default is `deps'
  74. {deps_dir, ["deps"]}.
  75. %% What dependencies we have, dependencies can be of 3 forms, an application
  76. %% name as an atom, eg. mochiweb, a name and a version (from the .app file), or
  77. %% an application name, a version and the SCM details on how to fetch it (SCM
  78. %% type, location and revision). Rebar currently supports git, hg, bzr and svn.
  79. {deps, [application_name,
  80. {application_name, "1.0.*"},
  81. {application_name, "1.0.*",
  82. {git, "git://github.com/basho/rebar.git", {branch, "master"}}}]}.
  83. %% == Subdirectories ==
  84. %% Subdirectories?
  85. {sub_dirs, ["dir1", "dir2"]}.
  86. %% == Plugins ==
  87. %% Plugins you wish to include.
  88. %% These can include any module on the code path, including deps.
  89. %% Alternatively, plugins can be placed as source files in the plugin_dir, in
  90. %% which case they will be compiled and loaded dynamically at runtime.
  91. {plugins, [plugin1, plugin2]}.
  92. %% Override the directory in which plugin sources can be found.
  93. %% Defaults to ./plugins
  94. {plugin_dir, "some_other_directory"}.
  95. %% == Pre/Post Command Hooks ==
  96. {pre_hooks, [{clean, "./prepare_package_files.sh"},
  97. {compile, "escript generate_headers"}]}.
  98. {post_hooks, [{clean, "touch file1.out"},
  99. {eunit, "touch file2.out"},
  100. {compile, "touch postcompile.out"}]}.
  101. %% == xref ==
  102. {xref_warnings, false}.
  103. %% xref checks to run
  104. {xref_checks, [exports_not_used, undefined_function_calls]}.