aboutsummaryrefslogtreecommitdiffstats
path: root/core/core.mk
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-01-08 13:40:43 +0100
committerLoïc Hoguin <[email protected]>2015-01-08 13:40:43 +0100
commitabb11f81f5e23ebda3334f1a8669aa9097a3895d (patch)
tree101774c96c0c89cf0782d7403a978e1ae7a9f89f /core/core.mk
parent2a6499a167354f2a1259b28b2c3105f08db977d1 (diff)
downloaderlang.mk-abb11f81f5e23ebda3334f1a8669aa9097a3895d.tar.gz
erlang.mk-abb11f81f5e23ebda3334f1a8669aa9097a3895d.tar.bz2
erlang.mk-abb11f81f5e23ebda3334f1a8669aa9097a3895d.zip
Speed up "erl" invocations
Use "+A0 -noinput -boot start_clean" as start argument. Use halt/{1,2} to shutdown the VM faster.
Diffstat (limited to 'core/core.mk')
-rw-r--r--core/core.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/core.mk b/core/core.mk
index a5fbffd..848c8e1 100644
--- a/core/core.mk
+++ b/core/core.mk
@@ -28,6 +28,10 @@ V ?= 0
gen_verbose_0 = @echo " GEN " $@;
gen_verbose = $(gen_verbose_$(V))
+# "erl" command.
+
+ERL = erl +A0 -noinput -boot start_clean
+
# Core targets.
ifneq ($(words $(MAKECMDGOALS)),1)
@@ -76,7 +80,7 @@ define core_http_get
endef
else
define core_http_get
- erl -noshell -eval 'ssl:start(), inets:start(), case httpc:request(get, {"$(2)", []}, [{autoredirect, true}], []) of {ok, {{_, 200, _}, _, Body}} -> case file:write_file("$(1)", Body) of ok -> ok; {error, R1} -> halt(R1) end; {error, R2} -> halt(R2) end, halt(0).'
+ $(ERL) -eval 'ssl:start(), inets:start(), case httpc:request(get, {"$(2)", []}, [{autoredirect, true}], []) of {ok, {{_, 200, _}, _, Body}} -> case file:write_file("$(1)", Body) of ok -> ok; {error, R1} -> halt(R1) end; {error, R2} -> halt(R2) end, halt(0).'
endef
endif