.emacs.d/Makefile
Daniel Borchmann 6fa623d9d7
Add simple makefile target to start a sandbox version of Emacs
This starts emacs in the local copy of the .emacs.d directory we are currently
in, by creating a new `sandbox` directory as home directory, linking the current
directory as `.emacs.d` into there, and starting emacs.
2020-11-21 11:47:52 +01:00

36 lines
1006 B
Makefile

# Inspired by https://nullprogram.com/blog/2020/01/22/
.POSIX:
EMACS = emacs
LDFLAGS = -L site-lisp $(patsubst %,-L %, $(wildcard elpa/*/))
EL = site-lisp/timeline-tools.el site-lisp/db-customize.el site-lisp/db-emms.el site-lisp/db-eshell.el site-lisp/db-hydras.el site-lisp/db-mail.el site-lisp/db-music.el site-lisp/db-org.el site-lisp/db-projects.el site-lisp/db-utils.el site-lisp/db-utils-test.el site-lisp/timeline-tools.el
TEST = $(wildcard site-lisp/*-test.el)
ELC = $(EL:.el=.elc)
TESTC = $(TEST:.el=.elc)
compile: $(ELC) $(TESTC)
timelinetools-test.elc: timeline-tools.elc
test: $(ELC) $(TESTC)
@echo "Testing $(TESTC)"
@$(EMACS) -Q --batch $(LDFLAGS) $(patsubst %,-l %, $(TESTC)) -f ert-run-tests-batch
clean:
rm -f $(ELC) $(TESTC)
distclean: clean
rm -rfv elpa
git checkout elpa
sandbox-start:
mkdir -p sandbox
ln -s $(PWD) sandbox/.emacs.d
HOME=$(PWD)/sandbox emacs
.SUFFIXES: .el .elc
.el.elc:
@echo "Compiling $<"
@$(EMACS) -Q --batch $(LDFLAGS) -f batch-byte-compile $<