aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-12-15 16:56:01 +0100
committerLoïc Hoguin <[email protected]>2015-12-15 16:56:01 +0100
commit3ede3d9ae27930c7a9bc09dd3219948e602476d5 (patch)
tree05a65e6911e3eb60192ffeed78bed0ae9d48b107
parenta0e78888a9557d147ac7b764635d2c54258db88a (diff)
downloaderlang.mk-3ede3d9ae27930c7a9bc09dd3219948e602476d5.tar.gz
erlang.mk-3ede3d9ae27930c7a9bc09dd3219948e602476d5.tar.bz2
erlang.mk-3ede3d9ae27930c7a9bc09dd3219948e602476d5.zip
Detect Erlang.mk before Rebar
This allows us to avoid autopatching when the Makefile of an Erlang.mk project contains the word "rebar". Had to update elvis and xref_runner to master for now because of incompatibilities. The problem went unnoticed for a while because they were autopatched.
-rw-r--r--core/deps.mk12
-rw-r--r--index/elvis.mk2
-rw-r--r--index/xref_runner.mk2
3 files changed, 7 insertions, 9 deletions
diff --git a/core/deps.mk b/core/deps.mk
index 166b4de..a74b29b 100644
--- a/core/deps.mk
+++ b/core/deps.mk
@@ -82,7 +82,10 @@ endif
# While Makefile file could be GNUmakefile or makefile,
# in practice only Makefile is needed so far.
define dep_autopatch
- if [ -f $(DEPS_DIR)/$(1)/Makefile ]; then \
+ if [ -f $(DEPS_DIR)/$(1)/erlang.mk ]; then \
+ $(call erlang,$(call dep_autopatch_appsrc.erl,$(1))); \
+ $(call dep_autopatch_erlang_mk,$(1)); \
+ elif [ -f $(DEPS_DIR)/$(1)/Makefile ]; then \
if [ 0 != `grep -c "include ../\w*\.mk" $(DEPS_DIR)/$(1)/Makefile` ]; then \
$(call dep_autopatch2,$(1)); \
elif [ 0 != `grep -ci rebar $(DEPS_DIR)/$(1)/Makefile` ]; then \
@@ -90,12 +93,7 @@ define dep_autopatch
elif [ -n "`find $(DEPS_DIR)/$(1)/ -type f -name \*.mk -not -name erlang.mk -exec grep -i rebar '{}' \;`" ]; then \
$(call dep_autopatch2,$(1)); \
else \
- if [ -f $(DEPS_DIR)/$(1)/erlang.mk ]; then \
- $(call erlang,$(call dep_autopatch_appsrc.erl,$(1))); \
- $(call dep_autopatch_erlang_mk,$(1)); \
- else \
- $(call erlang,$(call dep_autopatch_app.erl,$(1))); \
- fi \
+ $(call erlang,$(call dep_autopatch_app.erl,$(1))); \
fi \
else \
if [ ! -d $(DEPS_DIR)/$(1)/src/ ]; then \
diff --git a/index/elvis.mk b/index/elvis.mk
index ac6d76a..b9ca83d 100644
--- a/index/elvis.mk
+++ b/index/elvis.mk
@@ -4,4 +4,4 @@ pkg_elvis_description = Erlang Style Reviewer
pkg_elvis_homepage = https://github.com/inaka/elvis
pkg_elvis_fetch = git
pkg_elvis_repo = https://github.com/inaka/elvis
-pkg_elvis_commit = 0.2.4
+pkg_elvis_commit = master
diff --git a/index/xref_runner.mk b/index/xref_runner.mk
index 80ebce4..ded9a6f 100644
--- a/index/xref_runner.mk
+++ b/index/xref_runner.mk
@@ -4,4 +4,4 @@ pkg_xref_runner_description = Erlang Xref Runner (inspired in rebar xref)
pkg_xref_runner_homepage = https://github.com/inaka/xref_runner
pkg_xref_runner_fetch = git
pkg_xref_runner_repo = https://github.com/inaka/xref_runner
-pkg_xref_runner_commit = 0.2.0
+pkg_xref_runner_commit = master