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

136 行
3.6 KiB

  1. %% -*- tab-width: 4;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. %% Command to run before compiling
  9. {compile_pre_script, "./script.sh"}.
  10. %% Command to run after compiling
  11. {compile_post_script, "./script.sh"}.
  12. %% Command to run before cleaning
  13. {clean_pre_script, "./script.sh"}.
  14. %% Command to run after cleaning
  15. {clean_post_script, "./script.sh"}.
  16. %% == Erlang Compiler ==
  17. %% Erlang files to compile before the rest. Rebar automatically compiles
  18. %% parse_transforms and custom behaviours before anything other than the files
  19. %% in this list.
  20. {erl_first_files, ["mymib1", "mymib2"]}.
  21. %% Erlang compiler options
  22. {erl_opts, [{i, "myinclude"}, {src_dirs, ["src1", "src2"]},
  23. {platform_define,
  24. "(linux|solaris|freebsd|darwin)", 'HAVE_SENDFILE'},
  25. {platform_define, "(linux|freebsd)", 'BACKLOG', 128}]}.
  26. %% MIB Options?
  27. {mib_opts, []}.
  28. %% SNMP mibs to compile first?
  29. {mib_first_files, []}.
  30. %% == EDoc ==
  31. %% EDoc options
  32. {edoc_opts, []}.
  33. %% == Port Compiler ==
  34. %% List and wildcard list of files to be compiled. Default is `"c_src/*.c"'
  35. {port_sources, []}.
  36. %% Port compilation environment variables. See rebar_port_compiler.erl for
  37. %% more info. Default is `[]'
  38. {port_envs, []}.
  39. %% Tuple which specifies a pre-compilation script to run, and a filename that
  40. %% exists as a result of the script running.
  41. {port_pre_script, {"script.sh", "skipfile"}}.
  42. %% String that specifies a script to run during cleanup. Use this to remove
  43. %% files/directories created by port_pre_script.
  44. {port_cleanup_script, "cleanup.sh"}.
  45. %% Custom name of the port driver .so file. Defaults to `<Application>_drv.so'.
  46. {so_name, "driver.so"}.
  47. %% == LFE Compiler ==
  48. %% LFE files to compile before the rest
  49. {lfe_first_files, []}.
  50. %% Options for the LFE compiler
  51. {lfe_opts, []}.
  52. %% == ErlyDTL Compiler ==
  53. %% Options for the ErlyDTL compiler
  54. {erlydtl_opts, []}.
  55. %% == EUnit ==
  56. %% Options for eunit:test()
  57. {eunit_opts, []}.
  58. %% Additional compile options for eunit. erl_opts from above is also used
  59. {eunit_compile_opts, []}.
  60. %% Whether to enable coverage reporting. Default is `false'
  61. {cover_enabled, false}.
  62. %% Whether to print coverage report to console. Default is `false'
  63. {cover_print_enabled, false}.
  64. %% == Dialyzer ==
  65. %% Options for running dialyzer
  66. %% {plt, PltFile}
  67. %% 'src': run Dialyzer on the source files as in 'dialyzer --src'
  68. %% {warnings, [WarnOpts]}: turn on/off Dialyzer warnings
  69. {dialyzer_opts, [{plt, PltFile}, {warnings, [WarnOpts]}, src]}.
  70. %% == Cleanup ==
  71. %% Which files to cleanup
  72. {clean_files, ["file", "file2"]}.
  73. %% == Reltool ==
  74. %% Target directory for the release
  75. {target, "target"}.
  76. %% == OTP Applications ==
  77. %% Binaries to link into the erlang path?
  78. {app_bin, []}.
  79. %% Enable validation of the OTP app module list. Default is 'true'
  80. {validate_app_modules, true}.
  81. %% == Dependancies ==
  82. %% Where to put any downloaded depandencies. Default is `deps'
  83. {deps_dir, ["deps"]}.
  84. %% What dependancies we have, depandencies can be of 3 forms, an application
  85. %% name as an atom, eg. mochiweb, a name and a version (from the .app file), or
  86. %% an application name, a version and the SCM details on how to fetch it (SCM
  87. %% type, location and revision). Rebar currently support git, hg, bzr and svn.
  88. {deps, [application_name,
  89. {application_name, "1.0.*"},
  90. {application_name, "1.0.*", {hg, "http://bitbucket.org/basho/rebar/", "f3626d5858a6"}}]}.
  91. %% == Subdirectories ==
  92. %% Subdirectories?
  93. {sub_dirs, ["dir1", "dir2"]}.