summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
authorAlan Pearce2017-08-03 11:37:31 +0200
committerAlan Pearce2017-08-03 11:37:44 +0200
commitefa975ed49a33accf3d8c0d674320f26c9ec1cca (patch)
treec3610624bdf82be0d220751243fbc45defa2ae5d /emacs
parent91ddb83cbe0dfe03e9d2d3ea3984fc824407e5f9 (diff)
downloaddotfiles-efa975ed49a33accf3d8c0d674320f26c9ec1cca.tar.lz
dotfiles-efa975ed49a33accf3d8c0d674320f26c9ec1cca.tar.zst
dotfiles-efa975ed49a33accf3d8c0d674320f26c9ec1cca.zip
Emacs: Fix building emacs config files on macOS
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/emacs/.emacs.d/Makefile b/emacs/.emacs.d/Makefile
index 7741ef3..9f086ff 100644
--- a/emacs/.emacs.d/Makefile
+++ b/emacs/.emacs.d/Makefile
@@ -1,5 +1,6 @@
 define EMACS_TANGLE
 (progn\
+  (require 'package)\
   (package-refresh-contents nil)\
   (setq vc-follow-symlinks nil)\
   (find-file \"init.org\")\
@@ -7,6 +8,8 @@ define EMACS_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
 
@@ -14,10 +17,10 @@ all: init.elc
 .PHONY: all clean
 
 init.el:
-	@emacs --batch --no-init-file --eval "$(EMACS_TANGLE)" --kill
+	$(EMACS) --batch --no-init-file --eval "$(EMACS_TANGLE)" --kill
 
 init.elc: init.el
-	@emacs --batch --no-init-file --funcall batch-byte-compile init.el
+	$(EMACS) --batch --no-init-file --funcall batch-byte-compile init.el
 
 clean:
 	rm init.el init.elc