summaryrefslogblamecommitdiffstats
path: root/docs/en/erlang.mk/1/guide/why/index.html
blob: 7aed235e6dcd66c91c19272526ce94c145bbd174 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                                                           
                                                   


                                            
                                                                                                                      
                                                   





















































                                                                                                                                                                                          















































































                                                                                                                                  


 


                


                


                                          
                                                                                                                                   




                                                       
                                                                                                                      







                                                     





















































                                                                                                                                                                                                                           




                                         
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">

    <meta name="generator" content="Hugo 0.30.2" />

    <title>Nine Nines: Why Erlang.mk</title>

    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
    <link href="/css/99s.css?r=1" rel="stylesheet">

    <link rel="shortcut icon" href="/img/ico/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
    <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">

    
</head>


<body class="">
  <header id="page-head">
    <div id="topbar" class="container">
        <div class="row">
          <div class="span2">
            <h1 id="logo"><a href="/" title="99s">99s</a></h1>
          </div>
          <div class="span10">
            
            <div id="side-header">
              <nav>
                <ul>
                  <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
  				  <li><a title="Watch my talks" href="/talks">Talks</a></li>
  				  <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
  				  <li><a title="Request my services" href="/services">Consulting & Training</a></li>
                </ul>
              </nav> 
              <ul id="social">
                <li>
                  <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
                </li>
                    <li>
						<a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
					</li>
                    <li>
						<a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
					</li>
              </ul>
            </div>
          </div>
        </div>
    </div>


</header>

<div id="contents" class="two_col">
<div class="container">
<div class="row">
<div id="docs" class="span9 maincol">

<h1 class="lined-header"><span>Why Erlang.mk</span></h1>

<div class="paragraph"><p>Why would you choose Erlang.mk, if not for its
<a href="../overview">many features</a>? This chapter will
attempt to answer that.</p></div>
<div class="sect1">
<h2 id="_erlang_mk_is_fast">Erlang.mk is fast</h2>
<div class="sectionbody">
<div class="paragraph"><p>Erlang.mk is as fast as it gets.</p></div>
<div class="paragraph"><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></div>
<div class="paragraph"><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>
</div>
<div class="sect1">
<h2 id="_erlang_mk_gives_you_the_full_power_of_unix">Erlang.mk gives you the full power of Unix</h2>
<div class="sectionbody">
<div class="paragraph"><p>Erlang.mk is a Makefile.</p></div>
<div class="paragraph"><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></div>
<div class="paragraph"><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 <em>or even any language interpreter</em> 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&#8230;</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_erlang_mk_is_a_text_file">Erlang.mk is a text file</h2>
<div class="sectionbody">
<div class="paragraph"><p>Erlang.mk is a Makefile.</p></div>
<div class="paragraph"><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
<em>erlang.mk</em> file in your favorite editor, fix and/or comment
a few lines, save, and try again. It&#8217;s as simple as it gets.</p></div>
<div class="paragraph"><p>Currently using a binary build tool? Good luck with that.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_erlang_mk_can_manage_erlang_itself">Erlang.mk can manage Erlang itself</h2>
<div class="sectionbody">
<div class="paragraph"><p>Erlang.mk isn&#8217;t written in Erlang.</p></div>
<div class="paragraph"><p>That&#8217;s not a good thing, you say? Well, here&#8217;s one thing
that Erlang.mk and Makefiles can do for you that Erlang
build tool can&#8217;t easily: choose what version of Erlang is
to be used for compiling the project.</p></div>
<div class="paragraph"><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>make -k ci</code>.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_erlang_mk_can_do_more_than_erlang">Erlang.mk can do more than Erlang</h2>
<div class="sectionbody">
<div class="paragraph"><p>Erlang.mk doesn&#8217;t care what your dependencies are written in.</p></div>
<div class="paragraph"><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&#8230; 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>
</div>
<div class="sect1">
<h2 id="_erlang_mk_integrates_nicely_in_make_and_automake_projects">Erlang.mk integrates nicely in Make and Automake projects</h2>
<div class="sectionbody">
<div class="paragraph"><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></div>
<div class="paragraph"><p>Erlang.mk will happily sit in such an environment and behave
as you expect it to.</p></div>
</div>
</div>



	
		
		
		
		
		

		<nav style="margin:1em 0">
			
				<a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/external_plugins_list/">
					List of plugins
				</a>
			

			
				<a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/history/">
					Short history
				</a>
			
		</nav>
	



</div>

<div class="span3 sidecol">


<h3>
	Erlang.mk
	1
	
	User Guide
</h3>

<ul>
	
	
	
</ul>

<h4 id="docs-nav">Navigation</h4>

<h4>Version select</h4>
<ul>
	
	
	
		<li><a href="/docs/en/erlang.mk/1/guide">1</a></li>
	
</ul>

</div>
</div>
</div>
</div>

      <footer>
        <div class="container">
          <div class="row">
            <div class="span6">
              <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
              <nav>
                <ul>
                  <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
                </ul>
              </nav>
            </div>
            <div class="span6 credits">
               <p><img src="/img/footer_logo.png"></p>
               <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
            </div>
          </div>
        </div>
      </footer>

    
    <script src="/js/custom.js"></script>
  </body>
</html>