1 ## Makefile to export org in blog file to html
8 # To color the code block, install htmlize package
9 INIT_PACKAGES = "(progn \
11 (add-to-list 'package-archives '(\"melpa\" . \"http://melpa.org/packages/\")) \
12 (package-initialize) \
13 (unless (package-installed-p 'htmlize) (package-refresh-contents) (package-install 'htmlize)))"
15 # used for automation on server
16 CSS := $(wildcard css/*.css)
17 OBJS := $(addprefix $(OUTDIR)/,$(CSS))
19 #$(OUTDIR)/css/%.css:css/%.css
20 # rm -rf ~/.org-timestamps
21 #$(OBJS): $(CSS) my-publish.el
22 # remove the timestamp file to force publish all files
23 $(OBJS): $(OUTDIR)/css/%.css:css/%.css
24 rm -rf ~/.org-timestamps
26 .PHONY: update publish test clean
31 publish: update $(OBJS)
33 --eval $(INIT_PACKAGES) \
34 --eval '(setq debug-on-error t)' \
35 -l my-publish.el index.org \
36 --eval '(blog-setup-project-alist "$(BLOGDIR)" "$(OUTDIR)")' \
37 --eval '(org-publish-current-project)'
39 ## test will force publishing all files in the porject
41 # $(emacs) -Q --batch \
42 # --eval $(INIT_PACKAGES) \
43 # --eval '(setq debug-on-error t)' \
44 # -l my-publish.el index.org \
45 # --eval '(blog-setup-project-alist "$(BLOGDIR)")' \
46 # --eval '(org-publish-current-project t)'