Skip to content

Instantly share code, notes, and snippets.

@Version2beta
Created September 5, 2014 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Version2beta/49ba5def7f3119aa6394 to your computer and use it in GitHub Desktop.
Save Version2beta/49ba5def7f3119aa6394 to your computer and use it in GitHub Desktop.
erlang shell options
# Copyright (c) 2014, M Robert Martin <rob@version2beta.com>
# 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment