選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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