aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/compat.mk8
-rw-r--r--core/erlc.mk2
-rw-r--r--doc/src/guide/external_plugins_list.asciidoc6
-rw-r--r--index/bitcask.mk2
-rw-r--r--index/geode.mk7
-rw-r--r--index/jesse.mk4
-rw-r--r--index/jsone.mk7
-rw-r--r--index/kafka_protocol.mk7
-rw-r--r--plugins/bootstrap.mk4
-rw-r--r--test/core_compat.mk37
10 files changed, 74 insertions, 10 deletions
diff --git a/core/compat.mk b/core/compat.mk
index c7faf9b..239bc1c 100644
--- a/core/compat.mk
+++ b/core/compat.mk
@@ -19,8 +19,12 @@ define compat_erlc_opts_to_list
endef
define compat_rebar_config
-{deps, [$(call comma_list,$(foreach d,$(DEPS),\
- {$(call dep_name,$d),".*",{git,"$(call dep_repo,$d)","$(call dep_commit,$d)"}}))]}.
+{deps, [
+$(call comma_list,$(foreach d,$(DEPS),\
+ $(if $(filter hex,$(call dep_fetch,$d)),\
+ {$(call dep_name,$d)$(comma)"$(call dep_repo,$d)"},\
+ {$(call dep_name,$d)$(comma)".*"$(comma){git,"$(call dep_repo,$d)"$(comma)"$(call dep_commit,$d)"}})))
+]}.
{erl_opts, $(call compat_erlc_opts_to_list,$(ERLC_OPTS))}.
endef
diff --git a/core/erlc.mk b/core/erlc.mk
index 2297047..dc98bb3 100644
--- a/core/erlc.mk
+++ b/core/erlc.mk
@@ -244,7 +244,7 @@ ifeq ($(wildcard src/$(PROJECT).app.src),)
$(app_verbose) printf "$(subst $(newline),\n,$(subst ",\",$(call app_file,$(GITDESCRIBE),$(MODULES))))" \
> ebin/$(PROJECT).app
else
- $(verbose) if [ -z "$$(grep -E '^[^%]*{\s*modules\s*,' src/$(PROJECT).app.src)" ]; then \
+ $(verbose) if [ -z "$$(grep -e '^[^%]*{\s*modules\s*,' src/$(PROJECT).app.src)" ]; then \
echo "Empty modules entry not found in $(PROJECT).app.src. Please consult the erlang.mk README for instructions." >&2; \
exit 1; \
fi
diff --git a/doc/src/guide/external_plugins_list.asciidoc b/doc/src/guide/external_plugins_list.asciidoc
index 7e79757..f30797f 100644
--- a/doc/src/guide/external_plugins_list.asciidoc
+++ b/doc/src/guide/external_plugins_list.asciidoc
@@ -37,6 +37,12 @@ An https://github.com/ninenines/lfe.mk[LFE plugin] for Erlang.mk.
LFE, or http://lfe.io/[Lisp Flavoured Erlang], is an alternative
language for the BEAM.
+=== mix.mk
+
+A https://github.com/botsunit/mix.mk[Mix plugin] for Erlang.mk,
+to generate a compatible configuration file for
+http://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html[Mix].
+
=== reload.mk
A https://github.com/bullno1/reload.mk[live reload plugin] for Erlang.mk.
diff --git a/index/bitcask.mk b/index/bitcask.mk
index 2bc7af8..31930f3 100644
--- a/index/bitcask.mk
+++ b/index/bitcask.mk
@@ -4,4 +4,4 @@ pkg_bitcask_description = because you need another a key/value storage engine
pkg_bitcask_homepage = https://github.com/basho/bitcask
pkg_bitcask_fetch = git
pkg_bitcask_repo = https://github.com/basho/bitcask
-pkg_bitcask_commit = master
+pkg_bitcask_commit = develop
diff --git a/index/geode.mk b/index/geode.mk
new file mode 100644
index 0000000..4eaec34
--- /dev/null
+++ b/index/geode.mk
@@ -0,0 +1,7 @@
+PACKAGES += geode
+pkg_geode_name = geode
+pkg_geode_description = geohash/proximity lookup in pure, uncut erlang.
+pkg_geode_homepage = https://github.com/bradfordw/geode
+pkg_geode_fetch = git
+pkg_geode_repo = https://github.com/bradfordw/geode
+pkg_geode_commit = master
diff --git a/index/jesse.mk b/index/jesse.mk
index ae96908..b36b699 100644
--- a/index/jesse.mk
+++ b/index/jesse.mk
@@ -1,7 +1,7 @@
PACKAGES += jesse
pkg_jesse_name = jesse
pkg_jesse_description = jesse (JSon Schema Erlang) is an implementation of a json schema validator for Erlang.
-pkg_jesse_homepage = https://github.com/klarna/jesse
+pkg_jesse_homepage = https://github.com/for-GET/jesse
pkg_jesse_fetch = git
-pkg_jesse_repo = https://github.com/klarna/jesse
+pkg_jesse_repo = https://github.com/for-GET/jesse
pkg_jesse_commit = master
diff --git a/index/jsone.mk b/index/jsone.mk
new file mode 100644
index 0000000..cf7378e
--- /dev/null
+++ b/index/jsone.mk
@@ -0,0 +1,7 @@
+PACKAGES += jsone
+pkg_jsone_name = jsone
+pkg_jsone_description = An Erlang library for encoding, decoding JSON data.
+pkg_jsone_homepage = https://github.com/sile/jsone.git
+pkg_jsone_fetch = git
+pkg_jsone_repo = https://github.com/sile/jsone.git
+pkg_jsone_commit = master
diff --git a/index/kafka_protocol.mk b/index/kafka_protocol.mk
new file mode 100644
index 0000000..8a9fb2f
--- /dev/null
+++ b/index/kafka_protocol.mk
@@ -0,0 +1,7 @@
+PACKAGES += kafka_protocol
+pkg_kafka_protocol_name = kafka_protocol
+pkg_kafka_protocol_description = Kafka protocol Erlang library
+pkg_kafka_protocol_homepage = https://github.com/klarna/kafka_protocol
+pkg_kafka_protocol_fetch = git
+pkg_kafka_protocol_repo = https://github.com/klarna/kafka_protocol.git
+pkg_kafka_protocol_commit = master
diff --git a/plugins/bootstrap.mk b/plugins/bootstrap.mk
index 4aa1052..339ef27 100644
--- a/plugins/bootstrap.mk
+++ b/plugins/bootstrap.mk
@@ -11,8 +11,8 @@ help::
" bootstrap Generate a skeleton of an OTP application" \
" bootstrap-lib Generate a skeleton of an OTP library" \
" bootstrap-rel Generate the files needed to build a release" \
- " new-app n=NAME Create a new local OTP application NAME" \
- " new-lib n=NAME Create a new local OTP library NAME" \
+ " new-app in=NAME Create a new local OTP application NAME" \
+ " new-lib in=NAME Create a new local OTP library NAME" \
" new t=TPL n=NAME Generate a module NAME based on the template TPL" \
" new t=T n=N in=APP Generate a module NAME based on the template TPL in APP" \
" list-templates List available templates"
diff --git a/test/core_compat.mk b/test/core_compat.mk
index d38d4ef..ea994f5 100644
--- a/test/core_compat.mk
+++ b/test/core_compat.mk
@@ -2,10 +2,11 @@
#
# Note: autopatch functionality is covered separately.
-CORE_COMPAT_CASES = auto-rebar rebar rebar-deps rebar-deps-pkg rebar-erlc-opts rebar-pt
+CORE_COMPAT_CASES = auto-rebar rebar rebar-deps-git rebar-deps-hex rebar-deps-pkg rebar-erlc-opts rebar-pt
CORE_COMPAT_TARGETS = $(addprefix core-compat-,$(CORE_COMPAT_CASES))
REBAR_BINARY = https://github.com/rebar/rebar/releases/download/2.6.0/rebar
+REBAR3_BINARY = https://s3.amazonaws.com/rebar3/rebar3
.PHONY: core-compat $(CORE_COMPAT_TARGETS)
@@ -92,7 +93,7 @@ core-compat-rebar: build clean
$i "Use rebar to build the application"
$t cd $(APP) && ./rebar compile $v
-core-compat-rebar-deps: build clean
+core-compat-rebar-deps-git: build clean
$i "Bootstrap a new OTP library named $(APP)"
$t mkdir $(APP)/
@@ -124,6 +125,38 @@ core-compat-rebar-deps: build clean
$i "Use rebar to build the application"
$t cd $(APP) && ./rebar get-deps compile $v
+core-compat-rebar-deps-hex: build clean
+
+ $i "Bootstrap a new OTP library named $(APP)"
+ $t mkdir $(APP)/
+ $t cp ../erlang.mk $(APP)/
+ $t $(MAKE) -C $(APP) -f erlang.mk bootstrap-lib $v
+
+ $i "Add Cowboy as a dependency"
+ $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = cowboy\ndep_cowboy = hex 1.0.0\n"}' $(APP)/Makefile
+
+ $i "Run 'make rebar.config'"
+ $t $(MAKE) -C $(APP) rebar.config $v
+
+ $i "Check that rebar.config was created"
+ $t test -f $(APP)/rebar.config
+
+ $i "Check that Cowboy is listed in rebar.config"
+ $t $(ERL) -eval " \
+ {ok, C} = file:consult(\"$(APP)/rebar.config\"), \
+ {_, [{cowboy, \"1.0.0\"}]} = lists:keyfind(deps, 1, C), \
+ halt()"
+
+ $i "Distclean the application"
+ $t $(MAKE) -C $(APP) distclean $v
+
+ $i "Download rebar3"
+ $t curl -s -L -o $(APP)/rebar3 $(REBAR3_BINARY)
+ $t chmod +x $(APP)/rebar3
+
+ $i "Use rebar to build the application"
+ $t cd $(APP) && ./rebar3 compile $v
+
core-compat-rebar-deps-pkg: build clean
$i "Bootstrap a new OTP library named $(APP)"