aboutsummaryrefslogtreecommitdiffstats
path: root/guide/plugins_usage.html
diff options
context:
space:
mode:
Diffstat (limited to 'guide/plugins_usage.html')
-rw-r--r--guide/plugins_usage.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/guide/plugins_usage.html b/guide/plugins_usage.html
index e45f59d..ac3ee15 100644
--- a/guide/plugins_usage.html
+++ b/guide/plugins_usage.html
@@ -33,7 +33,7 @@ div.navfooter{margin-bottom:1em}
</header>
<main>
-<div class="navheader"><table width="100%" summary="Navigation header"><tr><td width="20%" align="left"><a accesskey="p" href="plugins.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="plugins_list.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="plugins_usage"></a>Chapter 22. External plugins</h2></div></div></div><p>It is often convenient to be able to keep the build files
+<div class="navheader"><table width="100%" summary="Navigation header"><tr><td width="20%" align="left"><a accesskey="p" href="plugins.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="plugins_list.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="plugins_usage"></a>Chapter 21. External plugins</h2></div></div></div><p>It is often convenient to be able to keep the build files
used by all your projects in one place. Those files could
be Makefiles, configuration files, templates and more.</p><p>Erlang.mk allows you to automatically load plugins from
dependencies. Plugins can do anything, including defining
@@ -42,19 +42,19 @@ inside the normal Erlang.mk processing or even adding new
rules.</p><p>You can load plugins using one of two methods. You can
either load all plugins from a dependency, or just one.
We will also cover conventions about writing external
-plugins.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_loading_all_plugins_from_a_dependency"></a>22.1. Loading all plugins from a dependency</h2></div></div></div><p>To load plugins from a dependency, all you need to do is add
+plugins.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_loading_all_plugins_from_a_dependency"></a>21.1. Loading all plugins from a dependency</h2></div></div></div><p>To load plugins from a dependency, all you need to do is add
the dependency name to <code class="literal">DEP_PLUGINS</code> in addition to the list
of dependencies.</p><p>For example, if you have <code class="literal">cowboy</code> in <code class="literal">DEPS</code>, add <code class="literal">cowboy</code> in
<code class="literal">DEP_PLUGINS</code> also:</p><pre class="programlisting">DEPS = cowboy
DEP_PLUGINS = cowboy</pre><p>This will load the file <span class="emphasis"><em>plugins.mk</em></span> in the root folder of
-the Cowboy repository.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_loading_one_plugin_from_a_dependency"></a>22.2. Loading one plugin from a dependency</h2></div></div></div><p>Now that we know how to load all plugins, let’s take a look
+the Cowboy repository.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_loading_one_plugin_from_a_dependency"></a>21.2. Loading one plugin from a dependency</h2></div></div></div><p>Now that we know how to load all plugins, let’s take a look
at how to load one specific plugin from a dependency.</p><p>To do this, instead of writing only the name of the dependency,
we will write its name and the path to the plugin file. This
means that writing <code class="literal">DEP_PLUGINS = cowboy</code> is equivalent to
writing <code class="literal">DEP_PLUGINS = cowboy/plugins.mk</code>.</p><p>Knowing this, if we were to load the plugin <span class="emphasis"><em>mk/dist.mk</em></span>
from Cowboy and no other, we would write the following in
our Makefile:</p><pre class="programlisting">DEPS = cowboy
-DEP_PLUGINS = cowboy/mk/dist.mk</pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_writing_external_plugins"></a>22.3. Writing external plugins</h2></div></div></div><p>The <span class="emphasis"><em>plugins.mk</em></span> file is a convention. It is meant to load
+DEP_PLUGINS = cowboy/mk/dist.mk</pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_writing_external_plugins"></a>21.3. Writing external plugins</h2></div></div></div><p>The <span class="emphasis"><em>plugins.mk</em></span> file is a convention. It is meant to load
all the plugins from the dependency. The code for the plugin
can be written directly in <span class="emphasis"><em>plugins.mk</em></span> or be separate.</p><p>If you are providing more than one plugin with your repository,
the recommended way is to create one file per plugin in the