1
0
Fork 0
emacs-config/GNUmakefile
Tom Willemse 58caf38935 Add ‘oni-conf’ and the ability to upload multi-file packages
‘oni-conf’ is the first package to include more than one file, it’s mostly a
package to allow distributing snippets.
2019-08-20 00:21:12 -07:00

32 lines
863 B
Makefile

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")))'
test-%:
emacs --batch \
--load oni-package.el \
--funcall package-initialize \
--eval '(package-refresh-contents)' \
--load ert \
--load "test/$*-test.el" \
--funcall package-initialize \
$(foreach DEP,$(DEPS),--eval "(package-install-file \"$(DEP).el\")") \
--eval "(package-install-file \"$*.el\")" \
--funcall ert-run-tests-batch-and-exit
clean:
rm -fv $(FILES)