# this file: # http://user.it.uu.se/~embe8573/emacs-init/Makefile # https://dataswamp.org/~incal/emacs-init/Makefile emacs=/usr/local/bin/emacs ema-erc=\"${ema-path}/erc\" ema-gnus=\"${ema-path}/gnus\" ema-ide=\"${ema-path}/ide\" ema-init=\"${ema-path}\" ema-w3m=\"${ema-path}/w3m\" ema=${ema-erc} ${ema-gnus} ${ema-ide} ${ema-init} ${ema-w3m} elpa-path=~/.emacs.d/elpa markdown-mode=\"${elpa-path}/markdown-mode-20201220.253\" w3m=\"${elpa-path}/w3m-20210104.424\" elpa=${markdown-mode} ${w3m} packs=${ema} ${elpa} byte-compile=$(emacs) \ --batch \ --eval "(setq load-path (append load-path '(${packs})))" \ -f batch-byte-compile sed-filter=2>&1 | sed '/^\(Loading\|Wrote\)/d' # errors and warnings only error-file=error.txt INIT_FILE=~/.emacs INIT_FILE_BC=$(INIT_FILE).elc ELS = $(shell zsh -c "ls -1 **/*.el") ELCS= $(ELS:.el=.elc) all: $(ELCS) $(INIT_FILE_BC) rm -f $(error-file) $(INIT_FILE_BC): $(INIT_FILE) $(byte-compile) $< $(sed-filter) %.elc: %.el $(byte-compile) $< $(sed-filter) > $(error-file) if [ -s $(error-file) ]; then echo -n "\n$<: "; cat $(error-file); fi rm -f $<~ clean: $(shell zsh -c "rm -rf **/*.elc(N)") rm -f $(INIT_FILE_BC) $(error-file) again: ${MAKE} clean ${MAKE} new: ${MAKE} again