aboutsummaryrefslogtreecommitdiffstats
path: root/guide/ch02.html
diff options
context:
space:
mode:
Diffstat (limited to 'guide/ch02.html')
-rw-r--r--guide/ch02.html10
1 files changed, 8 insertions, 2 deletions
diff --git a/guide/ch02.html b/guide/ch02.html
index 4705e3a..9a31c26 100644
--- a/guide/ch02.html
+++ b/guide/ch02.html
@@ -110,7 +110,13 @@ heart_beat_kill_pid = 16389
Erlang/OTP 18 [erts-7.0] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V7.0 (abort with ^G)
-([email protected])1&gt;</pre><p>Simple as that!</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_using_templates"></a>2.6. Using templates</h2></div></div></div><p>It is no secret that Erlang’s OTP behaviors tend to have some
+([email protected])1&gt;</pre><p>Simple as that!</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_using_spaces_instead_of_tabs"></a>2.6. Using spaces instead of tabs</h2></div></div></div><p>Erlang.mk defaults to tabs when creating files from templates.
+This is in part because of a personal preference, and in part
+because it is much easier to convert tabs to spaces than the
+opposite.</p><p>Use the <code class="literal">SP</code> variable if you prefer spaces. Set it to the number
+of spaces per indentation level you want.</p><p>For example, if you prefer two spaces per indentation level:</p><pre class="programlisting">$ make -f erlang.mk bootstrap SP=2</pre><p>When you bootstrap the project initially, the variable automatically
+gets added to the Makefile, so you only need to provide it when
+you get started.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_using_templates"></a>2.7. Using templates</h2></div></div></div><p>It is no secret that Erlang’s OTP behaviors tend to have some
boilerplate. It is rarely an issue of course, except when
creating new modules. That’s why Erlang.mk not only comes with
templates for generating projects, but also individual modules!</p><p>You can list all available templates with the <code class="literal">list-templates</code>
@@ -121,7 +127,7 @@ using the <code class="literal">gen_server</code> template.</p><p>This module is
<code class="literal">make</code>:</p><pre class="programlisting">$ make
ERLC my_server.erl
APP hello_joe.app.src</pre><p>All that’s left to do is to open it in your favorite editor
-and make it do something!</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_getting_help"></a>2.7. Getting help</h2></div></div></div><p>During development, if you don’t remember the name of a target,
+and make it do something!</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_getting_help"></a>2.8. Getting help</h2></div></div></div><p>During development, if you don’t remember the name of a target,
you can always run <code class="literal">make help</code>:</p><pre class="programlisting">$ make help
erlang.mk (version 1.2.0-642-gccd2b9f) is distributed under the terms of the ISC License.
Copyright (c) 2013-2015 Loïc Hoguin &lt;[email protected]&gt;