aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/guide/getting_started.asciidoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/guide/getting_started.asciidoc')
-rw-r--r--doc/src/guide/getting_started.asciidoc43
1 files changed, 40 insertions, 3 deletions
diff --git a/doc/src/guide/getting_started.asciidoc b/doc/src/guide/getting_started.asciidoc
index 34280d1..ef2f6e8 100644
--- a/doc/src/guide/getting_started.asciidoc
+++ b/doc/src/guide/getting_started.asciidoc
@@ -1,3 +1,4 @@
+[[getting_started]]
== Getting started
This chapter explains how to get started using Erlang.mk.
@@ -74,7 +75,7 @@ rm -rf .erlang.mk.build
This is Erlang.mk bootstrapping itself. Indeed, the file you
initially downloaded contains nothing more than the code needed
to bootstrap. This operation is done only once. Consult the
-link:updating.asciidoc[Updating Erlang.mk] chapter for more
+xref:updating[Updating Erlang.mk] chapter for more
information.
Of course, the generated project can now be compiled:
@@ -125,7 +126,7 @@ $ make -f erlang.mk bootstrap-lib bootstrap-rel
It is often very useful to keep the top-level project for
commands useful during operations, and put the components
of the system in separate applications that you will then
-depend on. Consult the link:deps.asciidoc[Packages and dependencies]
+depend on. Consult the xref:deps[Packages and dependencies]
chapter for more information.
When you run `make` from now on, Erlang.mk will compile your
@@ -150,7 +151,7 @@ _relx_, the release building tool. So don't worry if you see
more output than above.
If building the release is slow, no need to upgrade your
-hardware just yet. Just consult the link:relx.asciidoc[Releases]
+hardware just yet. Just consult the xref:relx[Releases]
chapter for various tips to speed up build time during
development.
@@ -183,6 +184,25 @@ Eshell V7.0 (abort with ^G)
Simple as that!
+=== Using spaces instead of tabs
+
+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.
+
+Use the `SP` variable if you prefer spaces. Set it to the number
+of spaces per indentation level you want.
+
+For example, if you prefer two spaces per indentation level:
+
+[source,bash]
+$ make -f erlang.mk bootstrap SP=2
+
+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.
+
=== Using templates
It is no secret that Erlang's OTP behaviors tend to have some
@@ -217,6 +237,23 @@ $ make
All that's left to do is to open it in your favorite editor
and make it do something!
+=== Hiding Erlang.mk from git
+
+Erlang.mk is a large text file. It can easily take a large part of
+a `git diff` or a `git grep` command. You can avoid this by telling
+Git that 'erlang.mk' is a binary file.
+
+Add this to your '.gitattributes' file. This is a file that you
+can create at the root of your repository:
+
+----
+erlang.mk -diff
+----
+
+The 'erlang.mk' file will still appear in diffs and greps, but
+as a binary file, meaning its contents won't be shown by default
+anymore.
+
=== Getting help
During development, if you don't remember the name of a target,