summary refs log tree commit diff stats
path: root/emacs/.emacs.d/Makefile
diff options
context:
space:
mode:
authorAlan Pearce2017-03-24 21:22:27 +0100
committerAlan Pearce2017-03-24 21:22:27 +0100
commitbbb26322199d41171595bff6d073bda1fa1fa62c (patch)
tree799f160f60327a1b026fd9f4065636e611ccafb0 /emacs/.emacs.d/Makefile
parent0c4343e413bbc922954b417a639c60dfa007a0da (diff)
parent53f50286e177abb9d1ac4a7c239dcbcc3fed63b7 (diff)
downloadnixfiles-bbb26322199d41171595bff6d073bda1fa1fa62c.tar.lz
nixfiles-bbb26322199d41171595bff6d073bda1fa1fa62c.tar.zst
nixfiles-bbb26322199d41171595bff6d073bda1fa1fa62c.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'emacs/.emacs.d/Makefile')
-rw-r--r--emacs/.emacs.d/Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/emacs/.emacs.d/Makefile b/emacs/.emacs.d/Makefile
new file mode 100644
index 00000000..3d965e44
--- /dev/null
+++ b/emacs/.emacs.d/Makefile
@@ -0,0 +1,22 @@
+define EMACS_TANGLE
+(progn\
+  (setq vc-follow-symlinks nil)\
+  (find-file \"init.org\")\
+  (require 'ob-tangle)\
+  (org-babel-tangle nil \"init.el\"))
+endef
+
+# 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