aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/core.mk2
-rw-r--r--doc/src/guide/app.asciidoc23
-rw-r--r--plugins/elvis.mk4
3 files changed, 26 insertions, 3 deletions
diff --git a/core/core.mk b/core/core.mk
index 97d126d..4b292ee 100644
--- a/core/core.mk
+++ b/core/core.mk
@@ -176,7 +176,7 @@ ERLANG_MK_BUILD_DIR ?= .erlang.mk.build
erlang-mk:
git clone https://github.com/ninenines/erlang.mk $(ERLANG_MK_BUILD_DIR)
- if [ -f $(ERLANG_MK_BUILD_CONFIG) ]; then cp $(ERLANG_MK_BUILD_CONFIG) $(ERLANG_MK_BUILD_DIR); fi
+ if [ -f $(ERLANG_MK_BUILD_CONFIG) ]; then cp $(ERLANG_MK_BUILD_CONFIG) $(ERLANG_MK_BUILD_DIR)/build.config; fi
cd $(ERLANG_MK_BUILD_DIR) && $(MAKE)
cp $(ERLANG_MK_BUILD_DIR)/erlang.mk ./erlang.mk
rm -rf $(ERLANG_MK_BUILD_DIR)
diff --git a/doc/src/guide/app.asciidoc b/doc/src/guide/app.asciidoc
index 880221a..a04c5a9 100644
--- a/doc/src/guide/app.asciidoc
+++ b/doc/src/guide/app.asciidoc
@@ -235,6 +235,29 @@ transforms have changed. Erlang.mk also automatically keeps
track of which files should be compiled first, for example
when you have behaviors used by other modules in your project.
+=== Generated source files ===
+
+Generated source files are supported: they should be listed as
+dependencies to `$(PROJECT).d`:
+
+[source,make]
+----
+PROJECT = example
+
+.DEFAULT_GOAL = all
+
+$(PROJECT).d:: src/generated_mod.erl
+
+include erlang.mk
+
+src/generated_mod.erl::
+ $(gen_verbose) ./gen-mod.sh $@
+----
+
+Note how `.DEFAULT_GOAL` is set to `all` near the beginning. Without
+this, `$(PROJECT).d` would become the default target, changing the
+expected behavior of this `Makefile`.
+
=== Cleaning
Building typically involves creating a lot of new files. Some
diff --git a/plugins/elvis.mk b/plugins/elvis.mk
index 3f4419a..58823b5 100644
--- a/plugins/elvis.mk
+++ b/plugins/elvis.mk
@@ -10,8 +10,8 @@ ELVIS_CONFIG ?= $(CURDIR)/elvis.config
ELVIS ?= $(CURDIR)/elvis
export ELVIS
-ELVIS_URL ?= https://github.com/inaka/elvis/releases/download/0.2.5-beta2/elvis
-ELVIS_CONFIG_URL ?= https://github.com/inaka/elvis/releases/download/0.2.5-beta2/elvis.config
+ELVIS_URL ?= https://github.com/inaka/elvis/releases/download/0.2.5/elvis
+ELVIS_CONFIG_URL ?= https://github.com/inaka/elvis/releases/download/0.2.5/elvis.config
ELVIS_OPTS ?=
# Core targets.