2020-10-16 09:41:26 +02:00
|
|
|
FILES := $(wildcard oni-*.el)
|
2019-03-28 08:53:55 +01:00
|
|
|
|
|
|
|
PACKAGE_TARGETS := $(addprefix package-,$(FILES))
|
|
|
|
|
2019-09-20 02:00:10 +02:00
|
|
|
define upload =
|
2023-04-27 08:08:21 +02:00
|
|
|
emacs --quick --batch \
|
|
|
|
--eval "(setq package-user-dir \"local-elpa/\")" \
|
2019-09-20 02:00:10 +02:00
|
|
|
--load oni-package.el \
|
|
|
|
--funcall package-initialize \
|
2023-04-27 08:08:21 +02:00
|
|
|
--eval "(let ((package-archive-upload-base \"bin/\")) \
|
|
|
|
(mkdir package-archive-upload-base t) \
|
|
|
|
(package-upload-file $1))"
|
2019-09-20 02:00:10 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define upload-multi-file =
|
|
|
|
$(call upload,(car (sort (file-expand-wildcards \"$1/dist/*.tar\") #'string>)))
|
|
|
|
cp $1/dist/$1-readme.txt bin/
|
|
|
|
endef
|
|
|
|
|
2020-10-19 22:42:28 +02:00
|
|
|
package: $(PACKAGE_TARGETS) package-oni-conf package-oni-css package-oni-elisp \
|
|
|
|
package-oni-haml package-oni-html package-oni-nxml package-oni-org \
|
|
|
|
package-oni-php package-oni-python package-oni-ruby package-oni-twig \
|
2020-10-19 22:44:23 +02:00
|
|
|
package-oni-csharp package-oni-bats
|
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
|
|
|
|
2020-10-19 22:44:23 +02:00
|
|
|
package-oni-bats:
|
|
|
|
$(call upload-multi-file,oni-bats)
|
|
|
|
|
2020-10-19 22:42:28 +02:00
|
|
|
package-oni-conf:
|
|
|
|
$(call upload-multi-file,oni-conf)
|
|
|
|
|
|
|
|
package-oni-css:
|
|
|
|
$(call upload-multi-file,oni-css)
|
|
|
|
|
|
|
|
package-oni-elisp:
|
|
|
|
$(call upload-multi-file,oni-elisp)
|
|
|
|
|
|
|
|
package-oni-haml:
|
|
|
|
$(call upload-multi-file,oni-haml)
|
|
|
|
|
|
|
|
package-oni-html:
|
|
|
|
$(call upload-multi-file,oni-html)
|
|
|
|
|
|
|
|
package-oni-nxml:
|
|
|
|
$(call upload-multi-file,oni-nxml)
|
|
|
|
|
|
|
|
package-oni-org:
|
|
|
|
$(call upload-multi-file,oni-org)
|
|
|
|
|
|
|
|
package-oni-php:
|
|
|
|
$(call upload-multi-file,oni-php)
|
|
|
|
|
|
|
|
package-oni-python:
|
|
|
|
$(call upload-multi-file,oni-python)
|
|
|
|
|
|
|
|
package-oni-ruby:
|
|
|
|
$(call upload-multi-file,oni-ruby)
|
|
|
|
|
|
|
|
package-oni-twig:
|
|
|
|
$(call upload-multi-file,oni-twig)
|
|
|
|
|
|
|
|
package-oni-csharp:
|
|
|
|
$(call upload-multi-file,oni-csharp)
|
2020-03-03 02:59:42 +01: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)
|