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.

145 regels
4.4 KiB

14 jaren geleden
13 jaren geleden
12 jaren geleden
14 jaren geleden
14 jaren geleden
13 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. %% == 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. {src_dirs, ["src", "src2", "src3"]},
  14. {platform_define,
  15. "(linux|solaris|freebsd|darwin)", 'HAVE_SENDFILE'},
  16. {platform_define, "(linux|freebsd)", 'BACKLOG', 128},
  17. {platform_define, "R13", 'old_inets'}]}.
  18. %% MIB Options?
  19. {mib_opts, []}.
  20. %% SNMP mibs to compile first?
  21. {mib_first_files, []}.
  22. %% leex options
  23. {xrl_opts, []}.
  24. %% leex files to compile first
  25. {xrl_first_files, []}.
  26. %% yecc options
  27. {yrl_opts, []}.
  28. %% yecc files to compile first
  29. {yrl_first_files, []}.
  30. %% == EDoc ==
  31. %% EDoc options
  32. {edoc_opts, []}.
  33. %% == escriptize ==
  34. {escript_name, "application"}.
  35. {escript_incl_apps, []}.
  36. {escript_shebang, "#!/usr/bin/env escript\n"}.
  37. {escript_comment, "%%\n"}.
  38. {escript_emu_args, "%%! -pa application/application/ebin\n"}.
  39. %% == ErlyDTL Compiler ==
  40. %% Options for the ErlyDTL compiler
  41. {erlydtl_opts, []}.
  42. %% == EUnit ==
  43. %% Options for eunit:test()
  44. {eunit_opts, []}.
  45. %% Additional compile options for eunit. erl_opts is also used
  46. {eunit_compile_opts, []}.
  47. %% Same as erl_first_files, but used only when running 'eunit'
  48. {eunit_first_files, []}.
  49. %% == Cover ==
  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. %% Whether to export coverage report to file. Default is `false'
  55. {cover_export_enabled, false}.
  56. %% == Common Test ==
  57. %% Override the default "test" directory in which SUITEs are located
  58. {ct_dir, "itest"}.
  59. %% Override the default "logs" directory in which SUITEs are logged
  60. {ct_log_dir, "test/logs"}.
  61. %% Option to pass extra parameters when launching Common Test
  62. {ct_extra_params, "-boot start_sasl -s myapp"}.
  63. %% Option to use short names (i.e., -sname test) when starting ct
  64. {ct_use_short_names, true}.
  65. %% What dependencies we have, dependencies can be of 3 forms, an application
  66. %% name as an atom, eg. mochiweb, a name and a version (from the .app file), or
  67. %% an application name, a version and the SCM details on how to fetch it (SCM
  68. %% type, location and revision).
  69. %% Rebar3 currently supports git and hg
  70. {deps, [app_name,
  71. {rebar, "1.0.*"},
  72. {rebar, ".*",
  73. {git, "git://github.com/rebar/rebar.git"}},
  74. {rebar, ".*",
  75. {git, "git://github.com/rebar/rebar.git", "Rev"}},
  76. {rebar, "1.0.*",
  77. {git, "git://github.com/rebar/rebar.git", {branch, "master"}}},
  78. {rebar, "1.0.0",
  79. {git, "git://github.com/rebar/rebar.git", {tag, "1.0.0"}}},
  80. {rebar, ".*",
  81. {git, "git://github.com/rebar/rebar.git", {ref, "7f73b8d3650b41ffd53a199f3eda20985eda84e3"}}},
  82. {app_name, ".*", {hg, "https://www.example.org/url"}}]}.
  83. %% == Pre/Post Command Hooks ==
  84. {pre_hooks, [{clean, "./prepare_package_files.sh"},
  85. {"linux", compile, "c_src/build_linux.sh"},
  86. {compile, "escript generate_headers"},
  87. {compile, "escript check_headers"}]}.
  88. {post_hooks, [{clean, "touch file1.out"},
  89. {"freebsd", compile, "c_src/freebsd_tweaks.sh"},
  90. {eunit, "touch file2.out"},
  91. {compile, "touch postcompile.out"}]}.
  92. %% == xref ==
  93. {xref_warnings, false}.
  94. %% optional extra paths to include in xref:set_library_path/2.
  95. %% specified relative location of rebar.config.
  96. %% e.g. {xref_extra_paths,["../gtknode/src"]}
  97. {xref_extra_paths,[]}.
  98. %% xref checks to run
  99. {xref_checks, [undefined_function_calls, undefined_functions,
  100. locals_not_used, exports_not_used,
  101. deprecated_function_calls, deprecated_functions]}.
  102. %% Optional custom xref queries (xref manual has details) specified as
  103. %% {xref_queries, [{query_string(), expected_query_result()},...]}
  104. %% The following for example removes all references to mod:*foo/4
  105. %% functions from undefined external function calls as those are in a
  106. %% generated module
  107. {xref_queries,
  108. [{"(XC - UC) || (XU - X - B"
  109. " - (\"mod\":\".*foo\"/\"4\"))",[]}]}.