branch: elpa/htmlize commit 68fe994aa19a9c1c1a44698f0e15024f5aac087c Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
Add Makefile --- Makefile | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..3d1046ccaa --- /dev/null +++ b/Makefile @@ -0,0 +1,59 @@ +-include .config.mk + +PKG = htmlize + +ELS = $(PKG).el +ELCS = $(ELS:.el=.elc) + +DEPS = + +EMACS ?= emacs +EMACS_ARGS ?= + +LOAD_PATH ?= $(addprefix -L ../,$(DEPS)) +LOAD_PATH += -L . + +all: lisp + +help: + $(info make all - generate byte-code and autoloads) + $(info make lisp - generate byte-code and autoloads) + $(info make redo - re-generate byte-code and autoloads) + $(info make clean - remove generated files) + @printf "\n" + +redo: clean lisp + +lisp: $(ELCS) loaddefs check-declare + +loaddefs: $(PKG)-autoloads.el + +%.elc: %.el + @printf "Compiling $<\n" + @$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) -f batch-byte-compile $< + +check-declare: + @printf " Checking function declarations\n" + @$(EMACS) -Q --batch $(EMACS_ARGS) $(LOAD_PATH) \ + --eval "(check-declare-directory default-directory)" + +CLEAN = $(ELCS) $(PKG)-autoloads.el + +clean: + @printf " Cleaning...\n" + @rm -rf $(CLEAN) + +$(PKG)-autoloads.el: $(ELS) + @printf " Creating $@\n" + @$(EMACS) -Q --batch -l autoload -l cl-lib --eval "\ +(let ((file (expand-file-name \"$@\"))\ + (autoload-timestamps nil) \ + (backup-inhibited t)\ + (version-control 'never)\ + (coding-system-for-write 'utf-8-emacs-unix))\ + (write-region (autoload-rubric file \"package\" nil) nil file nil 'silent)\ + (cl-letf (((symbol-function 'progress-reporter-do-update) (lambda (&rest _)))\ + ((symbol-function 'progress-reporter-done) (lambda (_))))\ + (let ((generated-autoload-file file))\ + (update-directory-autoloads default-directory))))" \ + 2>&1 | sed "/^Package autoload is deprecated$$/d"