Something went wrong. Try again.
emacs configuration files
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536EMACS ?= emacs
MODULES := (append (directory-files "lisp" t "\\.el$$") (directory-files-recursively "plugins" "\\.el$$"))FILES := (append (list "early-init.el" "init.el") $(MODULES))
.PHONY: checkdoc lint fmt clean update
checkdoc: $(EMACS) -Q --batch \ --eval '(progn (require (quote checkdoc)) (dolist (f $(FILES)) (checkdoc-file f)))'
lint: checkdoc @tmp=$$(mktemp -d); trap 'rm -rf "$$tmp"' EXIT; \ out=$$tmp/lint.log; \ $(EMACS) --batch -L lisp \ -l init.el \ --eval '(setq byte-compile-dest-file-function (lambda (f) (expand-file-name (concat (file-name-base f) ".elc") temporary-file-directory)))' \ --eval '(dolist (f $(MODULES)) (byte-compile-file f))' \ --eval '(byte-compile-file "early-init.el")' \ --eval '(byte-compile-file "init.el")' >"$$out" 2>&1; \ grep -E "Error" "$$out" | grep -v "Failed to parse package" || true; \ if grep -E "Error" "$$out" | grep -vq "Failed to parse package"; then exit 1; fi
update: $(EMACS) --batch -l init.el --eval '(mine-upgrade-packages)'
fmt: $(EMACS) -Q --batch \ --eval '(defun mine-fmt (f) (with-current-buffer (find-file-noselect f) (emacs-lisp-mode) (setq indent-tabs-mode nil) (indent-region (point-min) (point-max)) (save-buffer)))' \ --eval '(dolist (f $(FILES)) (mine-fmt f))'
clean: rm -f *.elc rm -rf eln-cache find lisp plugins -name '*.elc' -delete