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.

176 rivejä
5.1 KiB

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