diff options
Diffstat (limited to 'guide/shell.html')
-rw-r--r-- | guide/shell.html | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/guide/shell.html b/guide/shell.html new file mode 100644 index 0000000..ba172d6 --- /dev/null +++ b/guide/shell.html @@ -0,0 +1,46 @@ +<!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} +a{color:#d9230f;text-decoration:none} +a:hover{text-decoration:underline} +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="ch02.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="tests.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="eunit.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="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="tests.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="tests.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="eunit.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> |