overview.asciidoc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. [[overview]]
  2. == Overview
  3. Now that you know how to get started, let's take a look at
  4. what Erlang.mk can do for you.
  5. === Building your project
  6. Erlang.mk is first and foremost a build tool. It is especially
  7. tailored for Erlang developers and follows widely accepted
  8. practices in the Erlang community.
  9. Erlang.mk will happily build all xref:building[Erlang-specific files]
  10. you throw at it. Other kinds of files too, like C or C++ code
  11. when you are working on xref:ports[a NIF or a port driver].
  12. Erlang.mk embraces the concept of xref:deps[source dependencies].
  13. It can fetch dependency source code using a variety of mechanisms,
  14. including fetching from Git, Mercurial or SVN.
  15. Erlang.mk will automatically xref:relx[generate releases]
  16. when applicable. It can also xref:escript[generate escripts].
  17. === Exploring the package index
  18. Erlang.mk comes with a xref:deps[built-in package index].
  19. It is built as an extension of the dependency system and is
  20. meant to be used for discovery purposes.
  21. No package is ever installed, they are only used as dependencies
  22. and are always project-specific. They can be thought of as a
  23. shortcut over plain dependencies.
  24. You can get a list of all packages known to Erlang.mk by using
  25. the `search` target:
  26. [source,bash]
  27. $ make search
  28. You can also use this target to search across all packages, for
  29. example to find all packages related to Cowboy:
  30. [source,bash]
  31. $ make search q=cowboy
  32. === Generating documentation
  33. Erlang.mk supports _EDoc_ and _Asciidoc_.
  34. xref:edoc[EDoc] generates HTML documentation directly from
  35. your source code.
  36. While it is convenient, ask yourself: if all the documentation is
  37. inside the source code, why not just open the source code directly?
  38. That's where _Asciidoc_ comes in.
  39. The xref:asciidoc[Asciidoc] plugin expects all documentation
  40. to be separate from source. It will generate HTML, PDF, man pages and
  41. more from the documentation you write in the 'doc/src/' folder in
  42. your repository.
  43. === Running tests
  44. Erlang.mk supports a lot of different testing and static
  45. analysis tools.
  46. The xref:shell[make shell] command allows you
  47. to test your project manually. You can automate these
  48. unit tests with xref:eunit[EUnit] and test
  49. your entire system with xref:ct[Common Test].
  50. xref:coverage[Code coverage] can of course
  51. be enabled during tests.
  52. Erlang.mk comes with features to make your life easier when
  53. setting up and using xref:ci[Continuous integration].
  54. On the static analysis side of things, Erlang.mk comes with
  55. support for xref:dialyzer[Dialyzer] and xref:xref[Xref],
  56. to perform success typing analysis and cross referencing
  57. of the code.
  58. === Need more?
  59. Not convinced yet? You can read about xref:why[why you should use Erlang.mk]
  60. and its xref:history[history]. And if you're still not
  61. convinced after that, it's OK! The world would be boring if
  62. everyone agreed on everything all the time.