emacs-jupyter/Makefile
UndeadKernel 321e8fe81f fix: use Bash shell and omit rm errors (#13)
Without this change, if the user does not have bash, `command` fails (as
it is a bash built-in). Explicitly set bash to be the shell.

Omit error messages of the `rm` command while cleaning.
2019-02-06 14:26:52 -06:00

57 lines
917 B
Makefile

EMACS ?= emacs
SHELL = bash
CASK ?= $(shell command -v cask)
ifeq ($(CASK),)
$(error "Install cask (https://github.com/cask/cask)")
endif
FILES = $(wildcard *.el)
ELCFILES = $(FILES:.el=.elc)
ifneq ($(TAGS),)
override TAGS := -t $(TAGS)
endif
ifneq ($(PATTERN),)
override PATTERN := -p $(PATTERN)
endif
.PHONY: all
all: compile
# Build the zmq module.
.PHONY: zmq
zmq:
$(CASK) eval "(cl-letf (((symbol-function 'read-string) (lambda (&rest _) \"y\"))) (require 'zmq))"
.PHONY: init
init:
$(CASK) install
$(CASK) update
.PHONY: dev
dev:
$(CASK) --dev install
$(CASK) --dev update
.PHONY: test
test: zmq compile
$(CASK) exec ert-runner --script $(TAGS) $(PATTERN)
.PHONY: clean
clean:
make -C js clean
@rm $(ELCFILES) 2>/dev/null || true
.PHONY: clean-cask
clean-cask:
@rm -rf .cask/ 2>/dev/null || true
.PHONY: widgets
widgets:
make -C js
.PHONY: compile
compile: zmq
$(CASK) build