From c807880f7ac73f813b2660ea81a00f7712a4e793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 29 Aug 2016 12:39:49 +0200 Subject: Add old mailing list archives --- docs/en/erlang.mk/1/guide/app/index.html | 80 +++++++------------------------- 1 file changed, 16 insertions(+), 64 deletions(-) (limited to 'docs/en/erlang.mk/1/guide/app') diff --git a/docs/en/erlang.mk/1/guide/app/index.html b/docs/en/erlang.mk/1/guide/app/index.html index 7d2b36f8..619c7201 100644 --- a/docs/en/erlang.mk/1/guide/app/index.html +++ b/docs/en/erlang.mk/1/guide/app/index.html @@ -216,6 +216,14 @@ your situation.

+PROJECT_MOD +
+
+

+ The application callback module. +

+
+
PROJECT_REGISTERED
@@ -246,17 +254,7 @@ your situation.

There’s no need for quotes or anything. The relevant part of the Cowboy Makefile follows, if you need an example:

-
-
PROJECT = cowboy
-PROJECT_DESCRIPTION = Small, fast, modular HTTP server.
-PROJECT_VERSION = 2.0.0-pre.2
-PROJECT_REGISTERED = cowboy_clock
-
-LOCAL_DEPS = crypto
-DEPS = cowlib ranch
+

Any space before and after the value is dropped.

Dependencies are covered in details in the next chapter.

@@ -439,33 +437,19 @@ the erlc Manual for the full list.

By default, Erlang.mk will set the following options:

-
-
ERLC_OPTS = -Werror +debug_info +warn_export_vars +warn_shadow_vars +warn_obsolete_guard
+

In other words: warnings as errors, debug info (recommended) and enable warnings for exported variables, shadow variables and obsolete guard functions.

You can redefine this variable in your Makefile to change it completely, either before or after including Erlang.mk:

-
-
ERLC_OPTS = +debug_info
+

You can also filter out some options from the defaults Erlang.mk sets, by defining ERLC_OPTS after including Erlang.mk using the := operator.

-
-
include erlang.mk
-
-ERLC_OPTS := $(filter-out -Werror,$(ERLC_OPTS))
+

ERLC_EXCLUDE

@@ -475,11 +459,7 @@ not normally need it.

To exclude a module, simply list it in the variable, either before or after including Erlang.mk:

-
-
ERLC_EXCLUDE = cowboy_http2
+
@@ -525,11 +505,7 @@ when you have behaviors used by other modules in your project.

the dependency tracking file every time you compile. You can do this by adding the following line to your Makefile:

-
-
NO_MAKEDEP ?= 1
+

As you can see, the snippet above uses ?= instead of a simple equal sign. This is to allow you to temporarily override this value when you do make substantial changes to your project @@ -559,18 +535,7 @@ file is generated. To do this, you would add your hook before or after including the erlang.mk file.

The easiest way is after:

-
-
PROJECT = example
-
-include erlang.mk
-
-$(PROJECT).d:: src/generated_mod.erl
-
-src/generated_mod.erl:: gen-mod.sh
-        $(gen_verbose) ./gen-mod.sh $@
+

In this case we use $(gen_verbose) to hide the details of the build by default. Erlang.mk will simply say what file is it currently generating.

@@ -582,20 +547,7 @@ modified.

Erlang.mk, don’t forget to set the .DEFAULT_GOAL variable, otherwise nothing will get built:

-
-
PROJECT = example
-
-.DEFAULT_GOAL = all
-
-$(PROJECT).d:: src/generated_mod.erl
-
-include erlang.mk
-
-src/generated_mod.erl:: gen-mod.sh
-        $(gen_verbose) ./gen-mod.sh $@
+
-- cgit v1.2.3