diff options
Diffstat (limited to 'guide/ch14.html')
-rw-r--r-- | guide/ch14.html | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/guide/ch14.html b/guide/ch14.html index 7160d01..6225aeb 100644 --- a/guide/ch14.html +++ b/guide/ch14.html @@ -31,7 +31,16 @@ div.navfooter{margin-bottom:1em} </header> <main> -<div class="navheader"><table width="100%" summary="Navigation header"><tr><td width="20%" align="left"><a accesskey="p" href="pt03.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch15.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="_erlang_shell"></a>Chapter 14. Erlang shell</h2></div></div></div><p>Placeholder chapter.</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pt03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt03.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch15.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> +<div class="navheader"><table width="100%" summary="Navigation header"><tr><td width="20%" align="left"><a accesskey="p" href="pt03.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch15.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="_erlang_shell"></a>Chapter 14. Erlang shell</h2></div></div></div><p>Erlang.mk provides a convenient target for starting a shell +with all the paths set properly to experiment with your code.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_configuration_2"></a>14.1. Configuration</h2></div></div></div><p>The <code class="literal">SHELL_DEPS</code> variable can be used to define dependencies +that are only to be used when the <code class="literal">make shell</code> command is called. +For example, if you want to use <span class="emphasis"><em>kjell</em></span> as your shell:</p><pre class="programlisting">SHELL_DEPS = kjell</pre><p>Dependencies are downloaded and compiled the first time you +run the <code class="literal">make shell</code> command.</p><p>You can customize the executable used to start the Erlang shell. +To continue with our example, if you want to use <span class="emphasis"><em>kjell</em></span> as your +shell, you also need to change <code class="literal">SHELL_ERL</code> and point it to the +<code class="literal">kjell</code> executable:</p><pre class="programlisting">SHELL_ERL = $(DEPS_DIR)/kjell/bin/kjell</pre><p>You can specify additional options to be used when starting the +shell using the <code class="literal">SHELL_OPTS</code> variable:</p><pre class="programlisting">SHELL_OPTS = -setcookie chocolate</pre><p>Any of the usual <code class="literal">erl</code> options can be used, including <code class="literal">-eval</code>:</p><pre class="programlisting">SHELL_OPTS = -eval 'my_app:run()'</pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_usage"></a>14.2. Usage</h2></div></div></div><p>To start the shell, all you need is the following command:</p><pre class="programlisting">$ make shell</pre><p>The shell can be stopped as usual with a double Ctrl+C or the +command <code class="literal">q().</code>.</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pt03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt03.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch15.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> |