aboutsummaryrefslogtreecommitdiffstats
path: root/guide/edoc.html
blob: e24967c79c3cbcb686900069211a4f0c4c41b94a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Erlang.mk User Guide</title>
<style type="text/css"><!--
body{background:white;color:black;font-family:"Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;justify-content:center;margin:0 auto;padding:0;width:600px}
header {align-items:center;display:flex;justify-content:center}
header nav.left{text-align:right;width:150px}
header nav.right{text-align:left;width:150px}
header nav a{display:block;margin:1.5em 1em}
main{margin-top:2em;text-align:justify}
main h2, main h3{margin-top:2em}
main h1, main div.chapter>div.titlepage h2{font-size:2em;margin-top:.67em}
a{color:#d9230f;text-decoration:none}
a:hover{text-decoration:underline}
a.xref{display:none}
h1, h2, h3{font-weight:normal}
div.navfooter{margin-bottom:1em}
--></style>
</head>
<body>
<header>
	<nav class="left">
		<a href="index.html">User guide</a>
		<a href="getting_started.html">Tutorials</a>
	</nav>
	<a href="/" class="logo"><img src="../res/logo-small.png" alt="Erlang.mk" title="Erlang.mk: A build tool for Erlang that just works" height="200" width="206"/></a>
	<nav class="right">
		<a href="https://github.com/ninenines/erlang.mk/tree/master/index">470+ packages</a>
		<a href="https://github.com/ninenines/erlang.mk/issues">Issues?</a>
	</nav>
</header>
<main>

<div class="navheader"><table width="100%" summary="Navigation header"><tr><td width="20%" align="left"><a accesskey="p" href="asciidoc.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="tests.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="edoc"></a>Chapter 13. EDoc comments</h2></div></div></div><p>Erlang.mk provides a thin wrapper on top of EDoc, an application
that generates documentation based on comments found in modules.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_writing_edoc_comments"></a>13.1. Writing EDoc comments</h2></div></div></div><p>The <a class="ulink" href="http://www.erlang.org/doc/apps/edoc/chapter.html" target="_top">EDoc user guide</a>
explains everything you need to know about EDoc comments.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_configuration_2"></a>13.2. Configuration</h2></div></div></div><p>The <code class="literal">EDOC_OPTS</code> variable allows you to specify additional
EDoc options. Options are documented in the
<a class="ulink" href="http://www.erlang.org/doc/man/edoc.html#run-2" target="_top">EDoc manual</a>.</p><p>A common use for this variable is to enable Markdown in doc
comments, using the <code class="literal">edown</code> application:</p><pre class="programlisting">DOC_DEPS = edown
EDOC_OPTS = {doclet, edown_doclet}</pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_usage"></a>13.3. Usage</h2></div></div></div><p>To build all documentation, you would typically use:</p><pre class="programlisting">$ make docs</pre><p>Do note, however, that EDoc comments will only be generated
automatically if the <span class="emphasis"><em>doc/overview.edoc</em></span> file exists. If you
do not want that file and still want to generate doc comments,
two solutions are available.</p><p>You can generate EDoc documentation directly:</p><pre class="programlisting">$ make edoc</pre><p>You can enable automatic generation on <code class="literal">make docs</code> by adding
the following to your Makefile:</p><pre class="programlisting">docs:: edoc</pre></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="asciidoc.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="docs.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="tests.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div>
</main>
</body>
</html>