shell.mk 723 B

12345678910111213141516171819202122232425262728
  1. # Copyright (c) 2014, M Robert Martin <rob@version2beta.com>
  2. # This file is contributed to erlang.mk and subject to the terms of the ISC License.
  3. .PHONY: shell
  4. # Configuration.
  5. SHELL_PATH ?= -pa $(CURDIR)/ebin $(DEPS_DIR)/*/ebin
  6. SHELL_OPTS ?=
  7. ALL_SHELL_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(SHELL_DEPS))
  8. # Core targets
  9. help::
  10. @printf "%s\n" "" \
  11. "Shell targets:" \
  12. " shell Run an erlang shell with SHELL_OPTS or reasonable default"
  13. # Plugin-specific targets.
  14. $(foreach dep,$(SHELL_DEPS),$(eval $(call dep_target,$(dep))))
  15. build-shell-deps: $(ALL_SHELL_DEPS_DIRS)
  16. @for dep in $(ALL_SHELL_DEPS_DIRS) ; do $(MAKE) -C $$dep ; done
  17. shell: build-shell-deps
  18. $(gen_verbose) erl $(SHELL_PATH) $(SHELL_OPTS)