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.

45 lines
1.4 KiB

пре 15 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
пре 10 година
  1. %% TODO: rename FAIL to ABORT once we require at least R13B04 for
  2. %% building rebar. Macros with different arity were not supported by the
  3. %% compiler before 13B04.
  4. -define(FAIL, rebar_utils:abort()).
  5. -define(ABORT(Str, Args), rebar_utils:abort(Str, Args)).
  6. -define(CONSOLE(Str, Args), io:format(Str++"~n", Args)).
  7. -define(DEBUG(Str, Args), rebar_log:log(debug, Str, Args)).
  8. -define(INFO(Str, Args), rebar_log:log(info, Str, Args)).
  9. -define(WARN(Str, Args), rebar_log:log(warn, Str, Args)).
  10. -define(ERROR(Str, Args), rebar_log:log(error, Str, Args)).
  11. -define(FMT(Str, Args), lists:flatten(io_lib:format(Str, Args))).
  12. -define(DEFAULT_BASE_DIR, "_build").
  13. -define(DEFAULT_PROJECT_APP_DIRS, ["_checkouts", "apps", "lib", "."]).
  14. -define(DEFAULT_DEPS_DIR, "lib").
  15. -define(DEFAULT_PLUGINS_DIR, "plugins").
  16. -define(DEFAULT_TEST_DEPS_DIR, "test/lib").
  17. -define(DEFAULT_RELEASE_DIR, "rel").
  18. -define(DEFAULT_CONFIG_FILE, "rebar.config").
  19. -define(LOCK_FILE, "rebar.lock").
  20. -ifdef(namespaced_types).
  21. -type rebar_dict() :: dict:dict().
  22. -else.
  23. -type rebar_dict() :: dict().
  24. -endif.
  25. -ifdef(namespaced_types).
  26. -type rebar_digraph() :: digraph:graph().
  27. -else.
  28. -type rebar_digraph() :: digraph().
  29. -endif.
  30. -define(GRAPH_VSN, 2).
  31. -type v() :: {digraph:vertex(), term()} | 'false'.
  32. -type e() :: {digraph:vertex(), digraph:vertex()}.
  33. -type graph() :: {list(v()), list(e())}.
  34. -record(graph,
  35. {
  36. vsn = ?GRAPH_VSN :: pos_integer(),
  37. info = {[], []} :: graph()
  38. }).