diff options
Diffstat (limited to 'guide/ch09.html')
-rw-r--r-- | guide/ch09.html | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/guide/ch09.html b/guide/ch09.html index 30ed4a0..b0dc8fd 100644 --- a/guide/ch09.html +++ b/guide/ch09.html @@ -31,7 +31,26 @@ 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="ch08.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch10.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="_releases"></a>Chapter 9. Releases</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="ch08.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt01.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch10.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="ch08.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch10.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="_releases"></a>Chapter 9. Releases</h2></div></div></div><p>Erlang.mk relies on <span class="emphasis"><em>Relx</em></span> for generating releases. This +chapter covers the Erlang.mk-specific bits. Consult the +<a class="ulink" href="https://erlware.github.io/relx/" target="_top">Relx website</a> for more information.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_setup"></a>9.1. Setup</h2></div></div></div><p>Erlang.mk will create a release if it detects a Relx configuration +file in the <span class="emphasis"><em>$(RELX_CONFIG)</em></span> location. This defaults to +<span class="emphasis"><em>$(CURDIR)/relx.config</em></span>. You can override it by defining +the variable before including Erlang.mk:</p><pre class="programlisting">RELX_CONFIG = $(CURDIR)/webchat.config</pre><p>Relx does not need to be installed. Erlang.mk will download +and build it automatically.</p><p>The Relx executable will be saved in the <span class="emphasis"><em>$(RELX)</em></span> file. This +location defaults to <span class="emphasis"><em>$(CURDIR)/relx</em></span> and can be overriden.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_configuration"></a>9.2. Configuration</h2></div></div></div><p>You can specify additional Relx options using the <code class="literal">RELX_OPTS</code> +variable. For example, to enable <code class="literal">dev_mode</code>:</p><pre class="programlisting">RELX_OPTS = -d true</pre><p>While you can specify the output directory for the release +in the Relx options directly, Erlang.mk provides a specific +variable for it: <code class="literal">RELX_OUTPUT_DIR</code>. It defaults to the <span class="emphasis"><em>_rel</em></span> +directory. You can also override it:</p><pre class="programlisting">RELX_OUTPUT_DIR = /path/to/staging/directory</pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_generating_the_release"></a>9.3. Generating the release</h2></div></div></div><p>Now that you’re all set, all you need to do is generate the +release. As mentioned before, Erlang.mk will automatically +generate it when it detects the <span class="emphasis"><em>$(RELX_CONFIG)</em></span> file. This +means the following command will also build the release:</p><pre class="programlisting">$ make</pre><p>If you need to generate the release, and only the release, +the <code class="literal">rel</code> target can be used:</p><pre class="programlisting">$ make rel</pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_running_the_release"></a>9.4. Running the release</h2></div></div></div><p>Erlang.mk provides a convenience function for running the +release with one simple command:</p><pre class="programlisting">$ make run</pre><p>This command will also build the project and generate the +release if they weren’t already. It starts the release in +<span class="emphasis"><em>console mode</em></span>, meaning you will also have a shell ready to +use to check things as needed.</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch08.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt01.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch10.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> |