aboutsummaryrefslogtreecommitdiffstats
path: root/erlang.mk
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-10-14 16:05:19 +0200
committerLoïc Hoguin <[email protected]>2013-10-14 16:05:19 +0200
commit4769412daaff2be53cb7d7391d0a196acb6346c3 (patch)
tree5eb68affb5707a4c3cef72f7f1a71459cf7f56c3 /erlang.mk
parent2b2829f5855e4b2a6ba5e0ca5ccefd42fa2e9524 (diff)
downloadcowboy-4769412daaff2be53cb7d7391d0a196acb6346c3.tar.gz
cowboy-4769412daaff2be53cb7d7391d0a196acb6346c3.tar.bz2
cowboy-4769412daaff2be53cb7d7391d0a196acb6346c3.zip
erlang.mk now has built-in support for relx
Diffstat (limited to 'erlang.mk')
-rw-r--r--erlang.mk33
1 files changed, 30 insertions, 3 deletions
diff --git a/erlang.mk b/erlang.mk
index 2c09cf8..6fc011e 100644
--- a/erlang.mk
+++ b/erlang.mk
@@ -24,7 +24,7 @@ export PKG_FILE
PKG_FILE_URL ?= https://raw.github.com/extend/erlang.mk/master/packages.v1.tsv
define get_pkg_file
- wget -O $(PKG_FILE) $(PKG_FILE_URL)
+ wget -O $(PKG_FILE) $(PKG_FILE_URL) || rm $(PKG_FILE)
endef
# Verbosity and tweaks.
@@ -46,8 +46,35 @@ dtl_verbose = $(dtl_verbose_$(V))
gen_verbose_0 = @echo " GEN " [email protected];
gen_verbose = $(gen_verbose_$(V))
-.PHONY: all clean-all app clean deps clean-deps docs clean-docs \
- build-tests tests build-plt dialyze
+.PHONY: rel clean-rel all clean-all app clean deps clean-deps \
+ docs clean-docs build-tests tests build-plt dialyze
+
+# Release.
+
+RELX_CONFIG ?= $(CURDIR)/relx.config
+
+ifneq ($(wildcard $(RELX_CONFIG)),)
+
+RELX ?= $(CURDIR)/relx
+export RELX
+
+RELX_URL ?= https://github.com/erlware/relx/releases/download/0.4.0/relx
+
+define get_relx
+ wget -O $(RELX) $(RELX_URL) || rm $(RELX)
+ chmod +x $(RELX)
+endef
+
+rel: clean-rel all $(RELX)
+ @$(RELX)
+
+$(RELX):
+ @$(call get_relx)
+
+clean-rel:
+ @rm -rf _rel
+
+endif
# Deps directory.