aboutsummaryrefslogtreecommitdiffstats
path: root/GNUmakefile
blob: 909ce87015346d276262a619a7dc0f72ed196b2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FILES := $(wildcard *.el)

PACKAGE_TARGETS := $(addprefix package-,$(FILES))

package: $(PACKAGE_TARGETS) package-oni-conf

package-%: %
	emacs --batch \
	    --load oni-package.el \
	    --funcall package-initialize \
	    --eval '(package-upload-file "$^")'

package-oni-conf:
	emacs --batch \
	    --load oni-package.el \
	    --funcall package-initialize \
	    --eval '(package-upload-file (car (file-expand-wildcards "oni-conf/dist/*.tar")))'

install-%:
	emacs --batch \
	    --load oni-package.el \
	    --funcall package-initialize \
	    --eval '(package-refresh-contents)' \
	    $(foreach DEP,$(DEPS),--eval "(package-install-file \"$(DEP).el\")") \
	    --eval "(package-install-file \"$*.el\")" \

test-%: install-%
	emacs --batch \
	    --load oni-package.el \
	    --funcall package-initialize \
	    --load ert \
	    --load "test/$*-test.el" \
	    --eval "(setq ert-batch-backtrace-right-margin nil)" \
	    --funcall ert-run-tests-batch-and-exit

clean:
	rm -fv $(FILES)