From e23229baf851e14630889b21d956e23f13aae870 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 17 Mar 2017 10:39:59 +0100 Subject: Replace emacs hook with makefile --- emacs/.emacs.d/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 emacs/.emacs.d/Makefile (limited to 'emacs/.emacs.d/Makefile') diff --git a/emacs/.emacs.d/Makefile b/emacs/.emacs.d/Makefile new file mode 100644 index 0000000..fd51e39 --- /dev/null +++ b/emacs/.emacs.d/Makefile @@ -0,0 +1,19 @@ +define EMACS_TANGLE +(progn\ + (setq vc-follow-symlinks nil)\ + (find-file \"init.org\")\ + (require 'ob-tangle)\ + (org-babel-tangle nil \"init.el\")) +endef + +all: init.elc +.PHONY: all + +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 -- cgit 1.4.1 From ea6dafe072ff4f2c2d2483f2906780889e272811 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 20 Mar 2017 14:18:32 +0100 Subject: Add comments to Makefile --- emacs/.emacs.d/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'emacs/.emacs.d/Makefile') diff --git a/emacs/.emacs.d/Makefile b/emacs/.emacs.d/Makefile index fd51e39..3d965e4 100644 --- a/emacs/.emacs.d/Makefile +++ b/emacs/.emacs.d/Makefile @@ -6,8 +6,11 @@ define EMACS_TANGLE (org-babel-tangle nil \"init.el\")) endef +# The first target is the default. `all` is typically defined here. all: init.elc -.PHONY: all + +# These targets don't pertain to files +.PHONY: all clean init.el: @emacs --batch --no-init-file --eval "$(EMACS_TANGLE)" --kill -- cgit 1.4.1