emacs-jupyter/Makefile

51 lines
870 B
Makefile
Raw Normal View History

2018-11-15 14:20:26 -06:00
EMACS ?= emacs
2023-06-07 22:05:41 -05:00
ELDEV ?= $(shell command -v eldev)
2018-11-15 14:20:26 -06:00
FILES = $(wildcard *.el)
ELCFILES = $(FILES:.el=.elc)
2023-01-30 15:09:58 -06:00
TESTFILES = $(foreach file,$(wildcard test/*.el),-l $(file))
TESTSELECTORS =
2018-11-15 14:20:26 -06:00
ifneq ($(TAGS),)
2023-01-30 15:09:58 -06:00
comma := ,
2023-06-07 22:05:41 -05:00
TESTSELECTORS := $(foreach tag,$(subst $(comma), ,$(TAGS)),\"(tag $(tag))\")
2018-11-15 14:20:26 -06:00
endif
ifneq ($(PATTERN),)
2023-01-30 15:09:58 -06:00
TESTSELECTORS := $(TESTSELECTORS) \"$(PATTERN)\"
endif
2023-06-07 22:05:41 -05:00
# ifneq ($(TESTSELECTORS),)
# TESTSELECTORS := (quote (or $(TESTSELECTORS)))
# endif
2018-11-15 14:20:26 -06:00
.PHONY: all
all: compile
2023-06-07 22:05:41 -05:00
.PHONY: eldev
eldev:
ifeq ($(ELDEV),)
$(error "Install eldev (https://github.com/doublep/eldev)")
endif
2018-11-15 14:20:26 -06:00
.PHONY: test
test:
2023-06-07 22:05:41 -05:00
$(ELDEV) test $(TESTSELECTORS)
2018-11-15 14:20:26 -06:00
.PHONY: clean
clean:
make -C js clean
@rm $(ELCFILES) 2>/dev/null || true
2018-11-15 14:20:26 -06:00
2023-06-07 22:05:41 -05:00
.PHONY: clean-eldev
clean-eldev:
@rm -rf .eldev/ 2>/dev/null || true
2018-11-15 14:20:26 -06:00
.PHONY: widgets
widgets:
make -C js
.PHONY: compile
compile:
2023-06-07 22:05:41 -05:00
$(ELDEV) compile