2016-09-22 21:35:07 +08:00
|
|
|
HOSTNAME=`emacs --batch --eval '(message "%s" (system-name))' 2>&1`
|
|
|
|
|
2015-06-12 23:22:33 +08:00
|
|
|
EMACS=emacs
|
2016-09-22 21:35:07 +08:00
|
|
|
CACHE_DIR="private/cache/$(HOSTNAME)/"
|
2016-03-26 01:37:48 +08:00
|
|
|
REPO_URL="https://github.com/hlissner"
|
2014-12-06 06:28:03 +08:00
|
|
|
|
2016-05-31 09:19:10 +08:00
|
|
|
all: install
|
2015-01-24 12:57:42 +08:00
|
|
|
|
2016-05-24 05:07:59 +08:00
|
|
|
# If you run either of these with emacs open, run doom-reload afterwards
|
2016-06-07 11:46:40 +08:00
|
|
|
install: _install core/core.elc init.elc autoloads
|
|
|
|
update: _update core/core.elc init.elc autoloads
|
2014-12-06 06:28:03 +08:00
|
|
|
|
2016-03-26 01:37:48 +08:00
|
|
|
autoloads:
|
2016-05-24 05:07:59 +08:00
|
|
|
@$(EMACS) --batch -l init.el --eval '(doom-reload-autoloads)' 2>&1
|
2016-03-26 01:37:48 +08:00
|
|
|
|
2016-05-29 12:40:13 +08:00
|
|
|
compile: clean
|
|
|
|
@$(EMACS) --batch -l init.el --eval '(doom-byte-compile t)' 2>&1
|
|
|
|
|
2016-02-26 22:37:20 +08:00
|
|
|
snippets:
|
2016-03-26 01:37:48 +08:00
|
|
|
@[ -d private/snippets ] || git clone $(REPO_URL)/emacs-snippets private/snippets
|
2016-02-26 22:37:20 +08:00
|
|
|
|
2016-03-26 01:37:48 +08:00
|
|
|
clean:
|
2016-05-24 05:07:59 +08:00
|
|
|
@rm -rf auto-save-list recentf places ido.last async-bytecomp.log elpa tramp
|
|
|
|
@rm -rf projectile-bookmarks.eld projectile.cache company-statistics-cache.el
|
|
|
|
@rm -rf var semanticdb anaconda-mode
|
2016-03-26 01:37:48 +08:00
|
|
|
@rm -f *.elc {core,modules,private,contrib}/*.elc {core,modules}/defuns/*.elc
|
|
|
|
|
2016-05-24 05:07:59 +08:00
|
|
|
clean-cache:
|
2016-03-27 12:50:08 +08:00
|
|
|
@find $(CACHE_DIR) -type f -maxdepth 1 -delete
|
|
|
|
@rm -f $(CACHE_DIR)/{workgroups,pcache,ltxpng,backup}/*
|
2016-03-26 01:37:48 +08:00
|
|
|
|
2016-05-31 09:19:10 +08:00
|
|
|
clean-lite:
|
|
|
|
@rm -f init.elc core/core.elc
|
|
|
|
|
2016-10-02 22:19:49 +08:00
|
|
|
test:
|
|
|
|
@cask exec ert-runner -l core/core.el
|
|
|
|
|
2016-05-24 05:07:59 +08:00
|
|
|
########################################
|
2016-03-26 01:37:48 +08:00
|
|
|
|
|
|
|
%.elc: %.el
|
2016-05-24 05:07:59 +08:00
|
|
|
@$(EMACS) --batch -l init.el -f batch-byte-compile 2>&1 $<
|
2016-03-26 01:37:48 +08:00
|
|
|
|
2016-05-31 09:19:10 +08:00
|
|
|
_update: clean-lite
|
2016-03-26 01:37:48 +08:00
|
|
|
@cask update 2>&1
|
|
|
|
|
2016-05-31 09:19:10 +08:00
|
|
|
_install: clean-lite
|
2016-04-08 13:44:10 +08:00
|
|
|
@cask install 2>&1
|
2016-05-20 21:24:32 +08:00
|
|
|
@mkdir -p $(CACHE_DIR)/{undo,backup,workgroups}
|
2016-04-08 13:44:10 +08:00
|
|
|
|
2016-10-02 22:19:49 +08:00
|
|
|
.PHONY: all test
|