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.

147 lines
4.4 KiB

преди 14 години
преди 10 години
преди 10 години
преди 14 години
преди 14 години
преди 12 години
преди 12 години
преди 12 години
преди 13 години
преди 12 години
преди 13 години
преди 13 години
преди 14 години
преди 11 години
преди 14 години
преди 13 години
  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. %% == Erlang Compiler ==
  6. %% Erlang files to compile before the rest. Rebar automatically compiles
  7. %% parse_transforms and custom behaviours before anything other than the files
  8. %% in this list.
  9. {erl_first_files, ["src/mymib1.erl", "src/mymib2.erl"]}.
  10. %% Erlang compiler options
  11. {erl_opts, [no_debug_info,
  12. {i, "myinclude"},
  13. %% directories containing source files
  14. {src_dirs, ["src", "src2", "src3"]},
  15. %% extra_src_dirs are directories containing
  16. %% source files that are NOT part of the
  17. %% application itself
  18. {extra_src_dirs, ["eunit", "ct"]},
  19. {platform_define,
  20. "(linux|solaris|freebsd|darwin)", 'HAVE_SENDFILE'},
  21. {platform_define, "(linux|freebsd)", 'BACKLOG', 128},
  22. {platform_define, "R13", 'old_inets'}]}.
  23. %% MIB Options?
  24. {mib_opts, []}.
  25. %% SNMP mibs to compile first?
  26. {mib_first_files, []}.
  27. %% leex options
  28. {xrl_opts, []}.
  29. %% leex files to compile first
  30. {xrl_first_files, []}.
  31. %% yecc options
  32. {yrl_opts, []}.
  33. %% yecc files to compile first
  34. {yrl_first_files, []}.
  35. %% == EDoc ==
  36. %% EDoc options
  37. {edoc_opts, []}.
  38. %% == escriptize ==
  39. {escript_name, "application"}.
  40. {escript_incl_apps, []}.
  41. {escript_shebang, "#!/usr/bin/env escript\n"}.
  42. {escript_comment, "%%\n"}.
  43. {escript_emu_args, "%%! -pa application/application/ebin\n"}.
  44. %% == ErlyDTL Compiler ==
  45. %% Options for the ErlyDTL compiler
  46. {erlydtl_opts, []}.
  47. %% == EUnit ==
  48. %% Options for eunit:test()
  49. {eunit_opts, []}.
  50. %% Additional compile options for eunit. erl_opts is also used
  51. {eunit_compile_opts, []}.
  52. %% Files to compile first when compiling eunit test suites
  53. {eunit_first_files, []}.
  54. %% == Common Test ==
  55. %% Options to pass to ct:run_test/1
  56. {ct_opts, [{logdir, "logs"}, {dir, "test"}]}.
  57. %% Additional compile options for ct. erl_opts is also used
  58. {ct_compile_opts, []}.
  59. %% Files to compile first when compiling ct test suites
  60. {ct_first_files, []}.
  61. %% == Cover ==
  62. %% Whether to enable coverage reporting where commands support cover. Default
  63. %% is `false'
  64. {cover_enabled, false}.
  65. %% Options to pass to cover provider
  66. {cover_opts, [verbose]}.
  67. %% == Dependencies ==
  68. %% What dependencies we have, dependencies can be of 3 forms, an application
  69. %% name as an atom, eg. mochiweb, a name and a version (from the .app file), or
  70. %% an application name, a version and the SCM details on how to fetch it (SCM
  71. %% type, location and revision).
  72. %% Rebar3 currently supports git and hg
  73. {deps, [app_name,
  74. {rebar, "1.0.*"},
  75. {rebar, ".*",
  76. {git, "git://github.com/rebar/rebar.git"}},
  77. {rebar, ".*",
  78. {git, "git://github.com/rebar/rebar.git", "Rev"}},
  79. {rebar, "1.0.*",
  80. {git, "git://github.com/rebar/rebar.git", {branch, "master"}}},
  81. {rebar, "1.0.0",
  82. {git, "git://github.com/rebar/rebar.git", {tag, "1.0.0"}}},
  83. {rebar, ".*",
  84. {git, "git://github.com/rebar/rebar.git", {ref, "7f73b8d3650b41ffd53a199f3eda20985eda84e3"}}},
  85. {app_name, ".*", {hg, "https://www.example.org/url"}}]}.
  86. %% == Pre/Post Command Hooks ==
  87. {pre_hooks, [{clean, "./prepare_package_files.sh"},
  88. {"linux", compile, "c_src/build_linux.sh"},
  89. {compile, "escript generate_headers"},
  90. {compile, "escript check_headers"}]}.
  91. {post_hooks, [{clean, "touch file1.out"},
  92. {"freebsd", compile, "c_src/freebsd_tweaks.sh"},
  93. {eunit, "touch file2.out"},
  94. {compile, "touch postcompile.out"}]}.
  95. %% == xref ==
  96. {xref_warnings, false}.
  97. %% optional extra paths to include in xref:set_library_path/2.
  98. %% specified relative location of rebar.config.
  99. %% e.g. {xref_extra_paths,["../gtknode/src"]}
  100. {xref_extra_paths,[]}.
  101. %% xref checks to run
  102. {xref_checks, [undefined_function_calls, undefined_functions,
  103. locals_not_used, exports_not_used,
  104. deprecated_function_calls, deprecated_functions]}.
  105. %% Optional custom xref queries (xref manual has details) specified as
  106. %% {xref_queries, [{query_string(), expected_query_result()},...]}
  107. %% The following for example removes all references to mod:*foo/4
  108. %% functions from undefined external function calls as those are in a
  109. %% generated module
  110. {xref_queries,
  111. [{"(XC - UC) || (XU - X - B"
  112. " - (\"mod\":\".*foo\"/\"4\"))",[]}]}.