SHELL = bash EMACS := emacs .SECONDARY: VENDOR_DIRS := $(wildcard vendor-lisp/*) BASE_DIR := $(CURDIR) .PHONY: all snippets all: init.elc snippets %.elc: %.el @echo -e "\e[31mELC\e[0m $<" @$(EMACS) -batch \ -directory "$(HOME)/.emacs.d/vendor-lisp/emacs-slack" \ -directory "$(HOME)/.emacs.d/vendor-lisp/circe" \ -directory "$(HOME)/.emacs.d/vendor-lisp/circe-serenity" \ -eval "(package-initialize)" \ -eval "(byte-compile-file \"$<\")" ### Snippets SNIPPET_DIRS = $(wildcard snippets/*) COMPILED_SNIPPETS = $(addsuffix /.yas-compiled-snippets.el, $(SNIPPET_DIRS)) %/.yas-compiled-snippets.el: %/* @echo -e "\e[36mYAS\e[0m $(BASE_DIR)/snippets" @$(EMACS) -batch \ -eval "(package-initialize)" \ -l yasnippet \ -eval "(yas-compile-directory \"$(BASE_DIR)/snippets\")" snippets: $(COMPILED_SNIPPETS) ifeq ($(OS),Windows_NT) include windows.mk endif