dotfiles/emacs/.emacs.d/GNUmakefile

52 lines
1.6 KiB
Text
Raw Normal View History

2016-09-08 02:10:01 +02:00
include ../../dotfiles.mk
2016-08-05 01:42:39 +02:00
.SECONDARY:
2016-09-07 14:31:14 +02:00
AUTOLOADS_FILE = site-lisp/site-autoloads.el
UNWANTED = $(AUTOLOADS_FILE) site-lisp/flycheck_% site-lisp/flycheck-%
SITE_LISPS = $(addsuffix c,$(filter-out $(UNWANTED),$(wildcard site-lisp/*.el)))
2017-12-31 08:02:38 +01:00
INIT_LISPS = init/oni-org-init.elc init/oni-js2-init.elc \
$(addsuffix .elc,$(basename $(wildcard init/*.org)))
2016-11-03 15:25:10 +01:00
VENDOR_DIRS = $(wildcard vendor-lisp/*)
2016-09-07 14:31:14 +02:00
2016-11-24 21:41:10 +01:00
.PHONE: all snippets
all: $(SITE_LISPS) init.elc $(INIT_LISPS) $(AUTOLOADS_FILE) snippets
2016-08-05 01:42:39 +02:00
2017-12-31 08:02:38 +01:00
init.el init/oni-org-init.el init/oni-js2-init.el: init.org
2017-12-29 19:54:00 +01:00
$(call tangle,emacs-lisp)
2016-08-05 01:42:39 +02:00
%.el: %.org
2016-09-08 02:10:01 +02:00
$(call tangle,emacs-lisp)
2016-08-05 01:42:39 +02:00
%.elc: %.el
2016-09-18 00:04:54 +02:00
@echo -e "\e[31mELC\e[0m $<"
@$(EMACS) -batch \
-directory "$(HOME)/.emacs.d/site-lisp" \
2016-11-03 15:25:10 +01:00
-directory "$(HOME)/.emacs.d/vendor-lisp/emacs-slack" \
-directory "$(HOME)/.emacs.d/vendor-lisp/circe" \
2016-11-04 14:31:09 +01:00
-directory "$(HOME)/.emacs.d/vendor-lisp/circe-serenity" \
2016-09-07 14:31:14 +02:00
-eval "(package-initialize)" \
-eval "(byte-compile-file \"$<\")"
### Site Lisp
$(AUTOLOADS_FILE): $(SITE_LISPS)
2016-09-18 00:04:54 +02:00
@echo -e "\e[32mGEN\e[0m $@"
@$(EMACS) -batch \
2016-09-07 14:31:14 +02:00
-eval "(setq generated-autoload-file \"$(CURDIR)/$@\")" \
-eval "(update-directory-autoloads \"$(CURDIR)/site-lisp/\")"
2016-11-24 21:41:10 +01:00
### Snippets
SNIPPET_DIRS = $(wildcard snippets/*)
COMPILED_SNIPPETS = $(addsuffix /.yas-compiled-snippets.el, $(SNIPPET_DIRS))
%/.yas-compiled-snippets.el: %/*
@echo -e "\e[36mYAS\e[0m $(CURDIR)/snippets"
@$(EMACS) -batch \
-eval "(package-initialize)" \
-l yasnippet \
-eval "(yas-compile-directory \"$(CURDIR)/snippets\")"
snippets: $(COMPILED_SNIPPETS)