Compile snippets and improve site-lisp compilation
Files can't be left out from being compiled anymore. Even though the snippet rules depend on every `.yas-compiled-snippets.el' separately, when the first is compiled, the rest don't need to anymore.
This commit is contained in:
parent
dd58c6cf66
commit
668c80ccc7
1 changed files with 35 additions and 11 deletions
|
@ -1,31 +1,53 @@
|
||||||
SITE_LISPS = site-lisp/oni-smt.elc site-lisp/appt-init.elc \
|
EMACS = cask exec emacs
|
||||||
site-lisp/jabber-init.elc site-lisp/org-init.elc \
|
EARGS = -Q -batch -l package
|
||||||
site-lisp/gnus-init.elc site-lisp/drd.elc \
|
|
||||||
site-lisp/oni-eshell-prompt.elc
|
|
||||||
|
|
||||||
.PHONY: all site-lisp
|
.PHONY: all site-lisp snippets
|
||||||
all: init2.elc init.elc $(SITE_LISPS) site-lisp/site-autoloads.el
|
all: init2.elc init.elc site-lisp/site-autoloads.el snippets
|
||||||
|
|
||||||
|
### Init
|
||||||
|
|
||||||
%.elc: %.el
|
%.elc: %.el
|
||||||
@echo "ELC $<"
|
@echo "ELC $<"
|
||||||
@cask exec emacs -Q -batch -l package -eval "(byte-compile-file \"$<\")"
|
@$(EMACS) $(EARGS) -eval "(byte-compile-file \"$<\")"
|
||||||
|
|
||||||
init.el: init2.el
|
init.el: init2.el
|
||||||
init2.el: init.org org/intro.org
|
init2.el: init.org org/intro.org
|
||||||
@echo "OBT $<"
|
@echo "OBT $<"
|
||||||
@emacs -Q -batch -l "ob-tangle" -eval "(org-babel-tangle-file \"init.org\")"
|
@$(EMACS) $(EARGS) -l "ob-tangle" \
|
||||||
|
-eval "(org-babel-tangle-file \"init.org\")"
|
||||||
|
|
||||||
site-lisp/site-autoloads.el: $(SITE_LISPS)
|
### Site Lisp
|
||||||
|
|
||||||
|
AUTOLOADS_FILE=site-lisp/site-autoloads.el
|
||||||
|
UNWANTED=$(AUTOLOADS_FILE) site-lisp/flycheck_% site-lisp/flycheck-%
|
||||||
|
SITE_LISPS = $(addsuffix c,$(filter-out $(UNWANTED),$(wildcard site-lisp/*.el)))
|
||||||
|
|
||||||
|
$(AUTOLOADS_FILE): $(SITE_LISPS)
|
||||||
@echo "GEN $@"
|
@echo "GEN $@"
|
||||||
@cask exec emacs -Q -batch \
|
@$(EMACS) $(EARGS) \
|
||||||
-eval "(setq generated-autoload-file \"$(CURDIR)/$@\")" \
|
-eval "(setq generated-autoload-file \"$(CURDIR)/$@\")" \
|
||||||
-eval "(update-directory-autoloads \"$(CURDIR)/site-lisp/\")"
|
-eval "(update-directory-autoloads \"$(CURDIR)/site-lisp/\")"
|
||||||
|
|
||||||
|
### Snippets
|
||||||
|
|
||||||
|
SNIPPET_DIRS = $(wildcard snippets/*)
|
||||||
|
COMPILED_SNIPPETS = $(addsuffix /.yas-compiled-snippets.el, $(SNIPPET_DIRS))
|
||||||
|
|
||||||
|
%/.yas-compiled-snippets.el: %/*
|
||||||
|
$(EMACS) $(EARGS) -l yasnippet \
|
||||||
|
-eval "(yas-compile-directory \"$(CURDIR)/snippets\")"
|
||||||
|
|
||||||
|
snippets: $(COMPILED_SNIPPETS)
|
||||||
|
|
||||||
|
### Packages
|
||||||
|
|
||||||
rudel:
|
rudel:
|
||||||
git clone git://github.com/scymtym/rudel.git packages/rudel
|
git clone git://github.com/scymtym/rudel.git packages/rudel
|
||||||
emacs -Q --batch --visit packages/rudel/rudel-compile.el \
|
$(EMACS) $(EARGS) --visit packages/rudel/rudel-compile.el \
|
||||||
--eval "(eval-buffel)"
|
--eval "(eval-buffel)"
|
||||||
|
|
||||||
|
### Cleanup
|
||||||
|
|
||||||
clean-byte-compiled:
|
clean-byte-compiled:
|
||||||
rm -f $(SITE_LISPS) init2.elc init.elc
|
rm -f $(SITE_LISPS) init2.elc init.elc
|
||||||
|
|
||||||
|
@ -37,6 +59,8 @@ clean-export:
|
||||||
|
|
||||||
clean: clean-export clean-byte-compiled clean-generated
|
clean: clean-export clean-byte-compiled clean-generated
|
||||||
|
|
||||||
|
### HTML Export
|
||||||
|
|
||||||
export: clean-export
|
export: clean-export
|
||||||
emacs -L $(CURDIR) -L ~/.emacs.d/vendor-lisp/org/lisp \
|
emacs -L $(CURDIR) -L ~/.emacs.d/vendor-lisp/org/lisp \
|
||||||
-L ~/.emacs.d/vendor-lisp/org/contrib/lisp -batch -l project.el \
|
-L ~/.emacs.d/vendor-lisp/org/contrib/lisp -batch -l project.el \
|
||||||
|
|
Loading…
Reference in a new issue