2019-03-28 08:53:55 +01:00
|
|
|
FILES := $(wildcard *.el)
|
|
|
|
|
|
|
|
PACKAGE_TARGETS := $(addprefix package-,$(FILES))
|
|
|
|
|
2019-09-20 02:00:10 +02:00
|
|
|
define upload =
|
|
|
|
emacs --batch \
|
|
|
|
--load oni-package.el \
|
|
|
|
--funcall package-initialize \
|
|
|
|
--eval "(package-upload-file $1)"
|
|
|
|
endef
|
|
|
|
|
|
|
|
define upload-multi-file =
|
|
|
|
$(call upload,(car (sort (file-expand-wildcards \"$1/dist/*.tar\") #'string>)))
|
|
|
|
cp $1/dist/$1-readme.txt bin/
|
|
|
|
endef
|
|
|
|
|
2019-08-28 08:09:07 +02:00
|
|
|
package: $(PACKAGE_TARGETS) package-oni-conf package-oni-css package-oni-elisp \
|
2019-08-28 08:53:06 +02:00
|
|
|
package-oni-haml package-oni-html package-oni-nxml package-oni-org \
|
2019-08-28 09:11:08 +02:00
|
|
|
package-oni-php package-oni-python package-oni-ruby package-oni-twig
|
2019-03-28 08:53:55 +01:00
|
|
|
|
|
|
|
package-%: %
|
2019-09-20 02:00:10 +02:00
|
|
|
$(call upload,\"$^\")
|
2019-03-28 08:53:55 +01:00
|
|
|
|
2019-08-20 09:21:12 +02:00
|
|
|
package-oni-conf:
|
2019-09-20 02:00:10 +02:00
|
|
|
$(call upload-multi-file,oni-conf)
|
2019-08-20 09:21:12 +02:00
|
|
|
|
2019-08-24 08:39:07 +02:00
|
|
|
package-oni-css:
|
2019-09-20 02:00:10 +02:00
|
|
|
$(call upload-multi-file,oni-css)
|
2019-08-24 08:39:07 +02:00
|
|
|
|
2019-08-25 22:37:25 +02:00
|
|
|
package-oni-elisp:
|
2019-09-20 02:00:10 +02:00
|
|
|
$(call upload-multi-file,oni-elisp)
|
2019-08-25 22:37:25 +02:00
|
|
|
|
2019-08-28 08:09:07 +02:00
|
|
|
package-oni-haml:
|
2019-09-20 02:00:10 +02:00
|
|
|
$(call upload-multi-file,oni-haml)
|
2019-08-28 08:09:07 +02:00
|
|
|
|
2019-08-28 08:25:50 +02:00
|
|
|
package-oni-html:
|
2019-09-20 02:00:10 +02:00
|
|
|
$(call upload-multi-file,oni-html)
|
2019-08-28 08:25:50 +02:00
|
|
|
|
2019-08-28 08:34:58 +02:00
|
|
|
package-oni-nxml:
|
2019-09-20 02:00:10 +02:00
|
|
|
$(call upload-multi-file,oni-nxml)
|
2019-08-28 08:34:58 +02:00
|
|
|
|
2019-08-28 08:43:04 +02:00
|
|
|
package-oni-org:
|
2019-09-20 02:00:10 +02:00
|
|
|
$(call upload-multi-file,oni-org)
|
2019-08-28 08:43:04 +02:00
|
|
|
|
2019-08-28 08:53:06 +02:00
|
|
|
package-oni-php:
|
2019-09-20 02:00:10 +02:00
|
|
|
$(call upload-multi-file,oni-php)
|
2019-08-28 08:53:06 +02:00
|
|
|
|
2019-08-28 09:06:55 +02:00
|
|
|
package-oni-python:
|
2019-09-20 02:00:10 +02:00
|
|
|
$(call upload-multi-file,oni-python)
|
2019-08-28 09:06:55 +02:00
|
|
|
|
2019-08-28 09:09:30 +02:00
|
|
|
package-oni-ruby:
|
2019-09-20 02:00:10 +02:00
|
|
|
$(call upload-multi-file,oni-ruby)
|
2019-08-28 09:09:30 +02:00
|
|
|
|
2019-08-28 09:11:08 +02:00
|
|
|
package-oni-twig:
|
2019-09-20 02:00:10 +02:00
|
|
|
$(call upload-multi-file,oni-twig)
|
2019-08-28 09:11:08 +02:00
|
|
|
|
2019-08-23 08:47:45 +02:00
|
|
|
install-%:
|
2019-03-28 08:53:55 +01:00
|
|
|
emacs --batch \
|
|
|
|
--load oni-package.el \
|
|
|
|
--funcall package-initialize \
|
2019-12-11 09:31:28 +01:00
|
|
|
--eval "(add-to-list 'package-archives '(\"test\" . \"$(TEST_ARCHIVE)\"))" \
|
2019-03-28 08:53:55 +01:00
|
|
|
--eval '(package-refresh-contents)' \
|
2019-12-11 09:31:28 +01:00
|
|
|
--eval "(package-install '$*)"
|
2019-08-28 09:11:08 +02:00
|
|
|
|
2020-01-08 21:13:55 +01:00
|
|
|
unit-test-%: install-%
|
2019-08-23 08:47:45 +02:00
|
|
|
emacs --batch \
|
|
|
|
--load oni-package.el \
|
|
|
|
--funcall package-initialize \
|
|
|
|
--load ert \
|
|
|
|
--load "test/$*-test.el" \
|
|
|
|
--eval "(setq ert-batch-backtrace-right-margin nil)" \
|
2019-03-28 08:53:55 +01:00
|
|
|
--funcall ert-run-tests-batch-and-exit
|
|
|
|
|
2020-01-08 21:13:55 +01:00
|
|
|
integration-test-%: install-%
|
|
|
|
bats test/integration/$*.bats
|
|
|
|
|
2019-03-28 08:53:55 +01:00
|
|
|
clean:
|
|
|
|
rm -fv $(FILES)
|