Update Makefile for new bootstrap process

This commit is contained in:
Henrik Lissner 2016-05-23 17:07:59 -04:00
parent 60c8e0678b
commit 204847f95c

View file

@ -2,46 +2,43 @@ EMACS=emacs
CACHE_DIR="private/cache/`hostname`/`emacs --version | grep -o '2[0-9]\.[0-9]'`"
REPO_URL="https://github.com/hlissner"
all: install autoloads bootstrap.elc
all: install autoloads init.elc
# If you keep emacs open while running either of these, run doom-reload afterwards
install: autoloads _install bootstrap.elc
update: autoloads _update bootstrap.elc
# If you run either of these with emacs open, run doom-reload afterwards
install: autoloads _install init.elc
update: autoloads _update init.elc
autoloads:
@$(EMACS) --batch \
-l bootstrap.el \
-l core/core-defuns.el \
--eval '(doom-reload-autoloads)' 2>&1
@$(EMACS) --batch -l init.el --eval '(doom-reload-autoloads)' 2>&1
compile: autoloads bootstrap.elc
@$(EMACS) --batch -f batch-byte-compile 2>&1 \
{core,modules,modules/contrib,private}/*.el \
{core,modules}/defuns/*.el
compile: autoloads
@$(EMACS) --batch -l init.el --eval '(doom-byte-compile)' 2>&1
snippets:
@[ -d private/snippets ] || git clone $(REPO_URL)/emacs-snippets private/snippets
clean:
@rm -rf auto-save-list recentf places ido.last async-bytecomp.log elpa tramp projectile-bookmarks.eld projectile.cache company-statistics-cache.el var semanticdb anaconda-mode
@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
@rm -f *.elc {core,modules,private,contrib}/*.elc {core,modules}/defuns/*.elc
reset:
clean-cache:
@find $(CACHE_DIR) -type f -maxdepth 1 -delete
@rm -f $(CACHE_DIR)/{workgroups,pcache,ltxpng,backup}/*
########################################
%.elc: %.el
@$(EMACS) --batch -f batch-byte-compile 2>&1 $<
@$(EMACS) --batch -l init.el -f batch-byte-compile 2>&1 $<
_update:
@cask update 2>&1
@rm -f bootstrap.elc
@rm -f init.elc
_install:
@cask install 2>&1
@rm -f bootstrap.elc
@rm -f init.elc
@mkdir -p $(CACHE_DIR)/{undo,backup,workgroups}
.PHONY: all