Add publish make target
[blog.git] / Makefile
1 ## Makefile to export org in blog file to html
2
3 emacs ?= emacs
4 OUTDIR := 
5 FORCE := "no"
6 BLOGDIR := $(PWD)
7
8 all:
9         $(emacs) -Q --script blog.el $(OUTDIR) $(FORCE)
10
11 # used for automation on server
12 update:
13         git pull && $(emacs) -Q --script blog.el "~/www/html" "true" 
14
15 publish:
16         $(emacs) -Q --batch -l my-publish.el index.org \
17                 --eval '(setq debug-on-error t)' \
18                 --eval '(blog-setup-project-alist "$(BLOGDIR)" "$(OUTDIR)")' \
19                 --eval '(org-publish-current-project)'
20
21 compile:
22         $(emacs) -Q --batch -l my-publish.el index.org \
23                 --eval '(setq debug-on-error t)' \
24                 --eval '(blog-setup-project-alist "$(BLOGDIR)" "$(OUTDIR)")' \
25                 --eval '(org-publish-current-project t)'
26
27 clean:
28         rm -rf _site/*