This repository has been archived on 2022-05-13. You can view files and clone it, but cannot push or open issues or pull requests.
chronometrist/Makefile

83 lines
2.6 KiB
Makefile

.phony: all setup tangle compile lint clean
all: clean clean-tangle manual.md setup tangle compile lint
setup:
emacs --batch --eval="(package-initialize)" \
--eval="(mapcar #'package-install '(indent-lint package-lint relint))"
manual.md:
emacs -q -Q --batch --eval="(require 'ox-md)" \
"manual.org" -f 'org-md-export-to-markdown'
# No -q or -Q without ORG_PATH - if the user has a newer version of
# Org, we want to use it.
tangle:
cd elisp/ && \
emacs --batch \
--eval="(package-initialize)" \
--eval="(require 'ob-tangle)" \
--eval='(org-babel-tangle-file "chronometrist.org")' \
--eval='(org-babel-tangle-file "chronometrist-key-values.org")' \
--eval='(org-babel-tangle-file "chronometrist-spark.org")' ; \
cd .. ; \
compile: tangle
cd elisp/ && \
emacs -q -Q --batch \
--eval="(progn (package-initialize) (require 'dash) (require 'ts))" \
--eval='(byte-compile-file "chronometrist.el")' \
--eval='(byte-compile-file "chronometrist-key-values.el")' \
--eval='(byte-compile-file "chronometrist-spark.el")' ; \
cd ..
lint-check-declare: tangle
cd elisp/ && \
emacs -q -Q --batch \
--eval='(check-declare-file "chronometrist.el")' \
--eval='(check-declare-file "chronometrist-key-values.el")' \
--eval='(check-declare-file "chronometrist-spark.el")' ; \
cd ..
lint-checkdoc: tangle
cd elisp/ && \
emacs -q -Q --batch \
--eval='(checkdoc-file "chronometrist.el")' \
--eval='(checkdoc-file "chronometrist-key-values.el")' \
--eval='(checkdoc-file "chronometrist-spark.el")' ; \
cd ..
lint-package-lint: setup tangle
cd elisp/ && \
emacs -q -Q --batch \
--eval="(progn (package-initialize) (require 'dash) (require 'ts))" \
--eval="(require 'package-lint)" \
-f 'package-lint-batch-and-exit' chronometrist.el \
-f 'package-lint-batch-and-exit' chronometrist-key-values.el \
-f 'package-lint-batch-and-exit' chronometrist-spark.el ; \
cd ..
lint-relint: setup tangle
cd elisp/ && \
emacs -q -Q --batch \
--eval='(relint-file "chronometrist.el")' \
--eval='(relint-file "chronometrist-key-values.el")' \
--eval='(relint-file "chronometrist-spark.el")' ; \
cd ..
lint: lint-check-declare lint-checkdoc lint-package-lint lint-relint
clean-tangle:
-cd elisp/ && \
rm elisp/chronometrist.el \
elisp/chronometrist-key-values.el \
elisp/chronometrist-spark.el ; \
cd ..
clean-elc:
-cd elisp/ && \
rm elisp/*.elc ; \
cd ..
clean: clean-elc