# this file: # https://dataswamp.org/~incal/emacs-init/Makefile emacs = /usr/local/bin/emacs init-file = ${HOME}/.emacs init-file-elc = $(init-file).elc emacs-dir = ${HOME}/.emacs.d ema-path = $(emacs-dir)/emacs-init ema-bibtex = $(ema-path)/bibtex ema-erc = $(ema-path)/erc ema-gnus = $(ema-path)/gnus ema-ide = $(ema-path)/ide ema-mvc = $(ema-path)/mvc ema-w3m = $(ema-path)/w3m ema = \"$(ema-path)\" \ \"$(ema-bibtex)\" \ \"$(ema-erc)\" \ \"$(ema-gnus)\" \ \"$(ema-ide)\" \ \"$(ema-mvc)\" \ \"$(ema-w3m)\" elpa-path = $(emacs-dir)/elpa apt-sources-list = $(elpa-path)/apt-sources-list-20180527.1241 crontab-mode = $(elpa-path)/crontab-mode-20210715.133 macrostep = $(elpa-path)/macrostep-20240328.2134 markdown-mode = $(elpa-path)/markdown-mode-20240318.1307 slime = $(elpa-path)/slime-20240416.1756 subed = $(elpa-path)/subed-1.2.11 w3m = $(elpa-path)/w3m-20231023.653 elpa = \"$(apt-sources-list)\" \ \"$(crontab-mode)\" \ \"$(markdown-mode)\" \ \"$(macrostep)\" \ \"$(slime)\" \ \"$(subed)\" \ \"$(w3m)\" packs = $(elpa) $(ema) el-files = $(shell zsh -c "setopt extendedglob; ls -1 **/*.el~bad*") elc-files = $(el-files:.el=.elc) sed-filter = 2>&1 | sed '/^\(Loading\|Wrote\)/d' byte-compile = $(emacs) -Q \ --batch \ --eval "(setq load-path (append load-path '($(packs)))))" \ -f batch-byte-compile all: $(elc-files) $(init-file-elc) $(init-file-elc): $(init-file) $(byte-compile) $< $(sed-filter) $(emacs) -Q \ --batch \ --eval "(setq load-path (append load-path '($(packs)))))" \ --eval "(native-compile \"$<\")" $(sed-filter) %.elc: %.el $(byte-compile) $< $(sed-filter) $(emacs) -Q \ --batch \ --eval "(setq load-path (append load-path '($(packs)))))" \ --eval "(native-compile \"$<\")" $(sed-filter) clean: $(shell zsh -c "rm -rf **/*.elc(N)") rm -f $(init-file-elc) again: ${MAKE} clean ${MAKE} all test: echo $(byte-compile)