# 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-erc)\" \ \"$(ema-bibtex)\" \ \"$(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-20230813.2123 markdown-mode = $(elpa-path)/markdown-mode-2.6 slime = $(elpa-path)/slime-20231218.2206 w3m = $(elpa-path)/w3m-20231023.653 elpa = \"$(apt-sources-list)\" \ \"$(crontab-mode)\" \ \"$(markdown-mode)\" \ \"$(macrostep)\" \ \"$(slime)\" \ \"$(w3m)\" packs = $(elpa) $(ema) el-files = $(shell zsh -c "ls -1 **/*.el") 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)