summaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d/Makefile
blob: b0701fb68ff5c00dc2cfa490f5425db13e22e43a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
SITE_LISPS = site-lisp/oni-smt.elc site-lisp/appt-init.elc \
	site-lisp/jabber-init.elc site-lisp/org-init.elc \
	site-lisp/gnus-init.elc site-lisp/drd.elc \
	site-lisp/oni-eshell-prompt.elc

.PHONY: all site-lisp
all: init2.elc init.elc $(SITE_LISPS) site-lisp/site-autoloads.el

%.elc: %.el
	@echo "ELC $<"
	@cask exec emacs -Q -batch -l package -eval "(byte-compile-file \"$<\")"

init.el: init2.el
init2.el: init.org org/intro.org
	@echo "OBT $<"
	@emacs -Q -batch -l "ob-tangle" -eval "(org-babel-tangle-file \"init.org\")"

site-lisp/site-autoloads.el: $(SITE_LISPS)
	@echo "GEN $@"
	@cask exec emacs -Q -batch \
		-eval "(setq generated-autoload-file \"$(CURDIR)/$@\")" \
		-eval "(update-directory-autoloads \"$(CURDIR)/site-lisp/\")"

rudel:
	git clone git://github.com/scymtym/rudel.git packages/rudel
	emacs -Q --batch --visit packages/rudel/rudel-compile.el \
		--eval "(eval-buffel)"

clean-byte-compiled:
	rm -f $(SITE_LISPS) init2.elc init.elc

clean-autoloads:
	rm -f site-lisp/site-autoloads.el init2.el

clean-export:
	rm -rf _publish/*.*

clean: clean-export clean-byte-compiled clean-generated

export: clean-export
	emacs -L $(CURDIR) -L ~/.emacs.d/vendor-lisp/org/lisp \
		-L ~/.emacs.d/vendor-lisp/org/contrib/lisp -batch -l project.el \
		-f org-publish-all

publish: export
	rsync -avuz --exclude=*~ --delete _publish/ \
		ryuslash.org:public_html/orgweb/dotfiles/emacs