summary refs log tree commit diff stats
path: root/emacs/.emacs.d/Makefile
blob: 9f086ffd6c988487038463e7d74578e2da9f722c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
define EMACS_TANGLE
(progn\
  (require 'package)\
  (package-refresh-contents nil)\
  (setq vc-follow-symlinks nil)\
  (find-file \"init.org\")\
  (require 'ob-tangle)\
  (org-babel-tangle nil \"init.el\"))
endef

EMACS := ${NIX_LINK}/bin/emacs

# The first target is the default.  `all` is typically defined here.
all: init.elc

# These targets don't pertain to files
.PHONY: all clean

init.el:
	$(EMACS) --batch --no-init-file --eval "$(EMACS_TANGLE)" --kill

init.elc: init.el
	$(EMACS) --batch --no-init-file --funcall batch-byte-compile init.el

clean:
	rm init.el init.elc