aboutsummaryrefslogtreecommitdiffstats
path: root/core/core.mk
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-05-09 22:08:47 +0300
committerLoïc Hoguin <[email protected]>2015-05-09 22:08:47 +0300
commit5c5179dba66f55974c81e945ff4cf970a01c3d40 (patch)
treebfba53598005aaeeeee0ff9d5cbabc9775b8bc2a /core/core.mk
parent9bfc6ec0be7157115d07da8fafaeba8d1aa4f346 (diff)
downloaderlang.mk-5c5179dba66f55974c81e945ff4cf970a01c3d40.tar.gz
erlang.mk-5c5179dba66f55974c81e945ff4cf970a01c3d40.tar.bz2
erlang.mk-5c5179dba66f55974c81e945ff4cf970a01c3d40.zip
Add a 'run' command to run the relx release
Should only be used during development. Stolen idea from Tristan Sloughter who stole it from Ahmad Sherif. This commit also introduces the 'erlang' function for executing Erlang code written directly in the Makefile. The rest of the project will eventually move to using it as it's much cleaner than the previous solution.
Diffstat (limited to 'core/core.mk')
-rw-r--r--core/core.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/core.mk b/core/core.mk
index 5cb0b54..8d05adc 100644
--- a/core/core.mk
+++ b/core/core.mk
@@ -85,6 +85,15 @@ help::
# Core functions.
+define newline
+
+
+endef
+
+define erlang
+$(ERL) -eval "$(subst $(newline),,$(subst ",\\",$(1)))"
+endef
+
ifeq ($(shell which wget 2>/dev/null | wc -l), 1)
define core_http_get
wget --no-check-certificate -O $(1) $(2)|| rm $(1)