diff options
Diffstat (limited to 'guide/relx.html')
-rw-r--r-- | guide/relx.html | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/guide/relx.html b/guide/relx.html new file mode 100644 index 0000000..e1671dc --- /dev/null +++ b/guide/relx.html @@ -0,0 +1,56 @@ +<!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="ports.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="escript.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="relx"></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="ports.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="code.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="escript.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> |