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.

140 regels
3.7 KiB

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