aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-09-11 17:48:39 +0200
committerLoïc Hoguin <[email protected]>2014-09-11 17:49:38 +0200
commitb8b9fffb39537f44c65b6272e268ea2c88a5be56 (patch)
treea1781e7bd0febf162d2e23aa2bcd9df2002c41f4 /plugins
parentdac7978f780bd5712d9589cb6fb7d913af84ddb9 (diff)
parent889f959855de39323802791d02d0164df21d0a2c (diff)
downloaderlang.mk-b8b9fffb39537f44c65b6272e268ea2c88a5be56.tar.gz
erlang.mk-b8b9fffb39537f44c65b6272e268ea2c88a5be56.tar.bz2
erlang.mk-b8b9fffb39537f44c65b6272e268ea2c88a5be56.zip
Merge branch 'master' of git://github.com/Version2beta/erlang.mk
Diffstat (limited to 'plugins')
-rw-r--r--plugins/shell.mk28
1 files changed, 28 insertions, 0 deletions
diff --git a/plugins/shell.mk b/plugins/shell.mk
new file mode 100644
index 0000000..9cbee2e
--- /dev/null
+++ b/plugins/shell.mk
@@ -0,0 +1,28 @@
+# Copyright (c) 2014, M Robert Martin <[email protected]>
+# This file is contributed to erlang.mk and subject to the terms of the ISC License.
+
+.PHONY: shell
+
+# Configuration.
+
+SHELL_PATH ?= -pa ../$(PROJECT)/ebin $(DEPS_DIR)/*/ebin
+SHELL_OPTS ?=
+
+ALL_SHELL_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(SHELL_DEPS))
+
+# Core targets
+
+help::
+ @printf "%s\n" "" \
+ "Shell targets:" \
+ " shell Run an erlang shell with SHELL_OPTS or reasonable default"
+
+# Plugin-specific targets.
+
+$(foreach dep,$(SHELL_DEPS),$(eval $(call dep_target,$(dep))))
+
+build-shell-deps: $(ALL_SHELL_DEPS_DIRS)
+ @for dep in $(ALL_SHELL_DEPS_DIRS) ; do $(MAKE) -C $$dep ; done
+
+shell: build-shell-deps
+ $(gen_verbose) erl $(SHELL_PATH) $(SHELL_OPTS)