aboutsummaryrefslogtreecommitdiffstats
path: root/guide/why.html
blob: be7765260506650f1bc48c6c2e38f3d6427f5a57 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!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}
main h1, main div.chapter>div.titlepage h2{font-size:2em;margin-top:.67em}
a{color:#d9230f;text-decoration:none}
a:hover{text-decoration:underline}
a.xref{display:none}
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="getting_started.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="about.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="history.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="why"></a>Chapter 25. Why Erlang.mk</h2></div></div></div><p>Why would you choose Erlang.mk, if not for its
<a class="link" href="overview.html" title="Chapter 3. Overview">many features</a>
<a class="xref" href="overview.html" title="Chapter 3. Overview">Chapter 3, <em>Overview</em></a>? This chapter will
attempt to answer that.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_erlang_mk_is_fast"></a>25.1. Erlang.mk is fast</h2></div></div></div><p>Erlang.mk is as fast as it gets.</p><p>Erlang.mk will group the compilation of files so as to avoid
running the BEAM more than necessary. This saves many seconds
compared to traditional Makefiles, even on small projects.</p><p>Erlang.mk will not try to be too smart. It provides a simple
solution that works for most people, and gives additional
options for projects that run into edge cases, often in the
form of extra variables or rules to be defined.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_erlang_mk_gives_you_the_full_power_of_unix"></a>25.2. Erlang.mk gives you the full power of Unix</h2></div></div></div><p>Erlang.mk is a Makefile.</p><p>You could use Erlang.mk directly without configuring anything
and it would just work. But you can also extend it greatly
either through configuration or hooks, and you can of course
add your own rules to the Makefile.</p><p>In all cases: for configuration, hooks or custom rules, you
have all the power of Unix at your disposal, and can call
any utility <span class="emphasis"><em>or even any language interpreter</em></span> you want,
every time you need to. Erlang.mk also allows you to write
scripts in this small language called Erlang directly inside
your Makefile if you ever need to…</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_erlang_mk_is_a_text_file"></a>25.3. Erlang.mk is a text file</h2></div></div></div><p>Erlang.mk is a Makefile.</p><p>Which means Erlang.mk is a simple text file. You can edit a
text file. Nothing stops you. If you run into any bug, or
behavior that does not suit you, you can just open the
<span class="emphasis"><em>erlang.mk</em></span> file in your favorite editor, fix and/or comment
a few lines, save, and try again. It’s as simple as it gets.</p><p>Currently using a binary build tool? Good luck with that.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_erlang_mk_can_manage_erlang_itself"></a>25.4. Erlang.mk can manage Erlang itself</h2></div></div></div><p>Erlang.mk isn’t written in Erlang.</p><p>That’s not a good thing, you say? Well, here’s one thing
that Erlang.mk and Makefiles can do for you that Erlang
build tool can’t easily: choose what version of Erlang is
to be used for compiling the project.</p><p>This really is a one-liner in Erlang.mk (a few more lines
if you also let it download and build Erlang directly)
and allows for even greater things, like testing your
project across all supported Erlang versions in one small
command: <code class="literal">make -k ci</code>.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_erlang_mk_can_do_more_than_erlang"></a>25.5. Erlang.mk can do more than Erlang</h2></div></div></div><p>Erlang.mk doesn’t care what your dependencies are written in.</p><p>Erlang.mk will happily compile any dependency, as long as
they come with a Makefile. The dependency can be written
in C, C++ or even Javascript… Who cares, really? If you
need Erlang.mk to fetch it, then Erlang.mk will fetch it
and compile it as needed.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_erlang_mk_integrates_nicely_in_make_and_automake_projects"></a>25.6. Erlang.mk integrates nicely in Make and Automake projects</h2></div></div></div><p>If you are planning to put your project in the middle of
a Make or Automake-based build environment, then the most
logical thing to do is to use a Makefile.</p><p>Erlang.mk will happily sit in such an environment and behave
as you expect it to.</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="about.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="about.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="history.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>