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.

165 lines
4.8 KiB

14 years ago
  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, []}.
  30. %% port_specs
  31. %% List of filenames or wildcards to be compiled. May also contain a tuple
  32. %% consisting of a regular expression to be applied against the system
  33. %% architecture as a filter.
  34. {port_specs, [{"priv/so_name.so", ["c_src/*.c"]},
  35. {"linux", "priv/hello_linux", ["c_src/hello_linux.c"]]}.
  36. %% == LFE Compiler ==
  37. %% LFE files to compile before the rest
  38. {lfe_first_files, []}.
  39. %% Options for the LFE compiler: reuse {erl_opts, []}
  40. %% == ErlyDTL Compiler ==
  41. %% Options for the ErlyDTL compiler
  42. {erlydtl_opts, []}.
  43. %% == EUnit ==
  44. %% Options for eunit:test()
  45. {eunit_opts, []}.
  46. %% Additional compile options for eunit. erl_opts from above is also used
  47. {eunit_compile_opts, []}.
  48. %% Same as erl_first_files, but used only when running 'eunit'
  49. {eunit_first_files, []}.
  50. %% Whether to enable coverage reporting. Default is `false'
  51. {cover_enabled, false}.
  52. %% Whether to print coverage report to console. Default is `false'
  53. {cover_print_enabled, false}.
  54. %% == Common Test ==
  55. %% Override the default "test" directory in which SUITEs are located
  56. {ct_dir, "itest"}.
  57. %% Option to pass extra parameters when launching Common Test
  58. {ct_extra_params, "-boot start_sasl -s myapp"}.
  59. %% == Cleanup ==
  60. %% Which files to cleanup
  61. {clean_files, ["file", "file2"]}.
  62. %% == Reltool ==
  63. %% Target directory for the release
  64. {target, "target"}.
  65. %% == OTP Applications ==
  66. %% Binaries to link into the erlang path?
  67. {app_bin, []}.
  68. %% Enable validation of the OTP app module list. Default is 'true'
  69. {validate_app_modules, true}.
  70. %% == Dependencies ==
  71. %% Where to put any downloaded dependencies. Default is "deps"
  72. {deps_dir, "deps"}.
  73. %% What dependencies we have, dependencies can be of 3 forms, an application
  74. %% name as an atom, eg. mochiweb, a name and a version (from the .app file), or
  75. %% an application name, a version and the SCM details on how to fetch it (SCM
  76. %% type, location and revision). Rebar currently supports git, hg, bzr and svn.
  77. {deps, [application_name,
  78. {application_name, "1.0.*"},
  79. {application_name, "1.0.*",
  80. {git, "git://github.com/basho/rebar.git", {branch, "master"}}},
  81. {application_name, "1.0.*",
  82. {git, "git://github.com/basho/rebar.git", {branch, "master"}},
  83. [{alt_url, "https://github.com/basho/rebar.git"}]}]}.
  84. %% == Subdirectories ==
  85. %% Subdirectories?
  86. {sub_dirs, ["dir1", "dir2"]}.
  87. %% == Plugins ==
  88. %% Plugins you wish to include.
  89. %% These can include any module on the code path, including deps.
  90. %% Alternatively, plugins can be placed as source files in the plugin_dir, in
  91. %% which case they will be compiled and loaded dynamically at runtime.
  92. {plugins, [plugin1, plugin2]}.
  93. %% Override the directory in which plugin sources can be found.
  94. %% Defaults to ./plugins
  95. {plugin_dir, "some_other_directory"}.
  96. %% == Pre/Post Command Hooks ==
  97. {pre_hooks, [{clean, "./prepare_package_files.sh"},
  98. {"linux", compile, "c_src/build_linux.sh"},
  99. {compile, "escript generate_headers"},
  100. {compile, "escript check_headers"}]}.
  101. {post_hooks, [{clean, "touch file1.out"},
  102. {"freebsd", compile, "c_src/freebsd_tweaks.sh"},
  103. {eunit, "touch file2.out"},
  104. {compile, "touch postcompile.out"}]}.
  105. %% == xref ==
  106. {xref_warnings, false}.
  107. %% xref checks to run
  108. {xref_checks, [exports_not_used, undefined_function_calls]}.
  109. %% Optional custom xref queries (xref manual has details) specified as
  110. %% {xref_queries, [{query_string(), expected_query_result()},...]}
  111. %% The following for example removes all references to ejabberd:*_msg/4
  112. %% functions from undefined external function calls as those are in a
  113. %% generated module
  114. {xref_queries,
  115. [{"(XC - UC) || (XU - X - B"
  116. " - (\"ejabberd_logger\":\".*_msg\"/\"4\"))",[]}]}.