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)")
|
2019-02-12 20:23:08 -06:00
|
|
|
endif
|
|
|
|
|
2018-11-15 14:20:26 -06:00
|
|
|
.PHONY: test
|
2023-01-31 13:55:56 -06:00
|
|
|
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
|
2019-02-06 20:26:52 +00:00
|
|
|
@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
|
2023-01-31 13:55:56 -06:00
|
|
|
compile:
|
2023-06-07 22:05:41 -05:00
|
|
|
$(ELDEV) compile
|