From 889f959855de39323802791d02d0164df21d0a2c Mon Sep 17 00:00:00 2001 From: Rob Martin Date: Wed, 3 Sep 2014 17:42:53 -0600 Subject: Created shell target --- plugins/shell.mk | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 plugins/shell.mk (limited to 'plugins/shell.mk') 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 +# 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) -- cgit v1.2.3