X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=Makefile;h=a5cc3514e30fc9738d6106622ebaad6bf79bc59f;hb=7ba82c345f08c4021a1fc9b9cf4a3bdbbb36f4d1;hp=b8a0e31d121356ebb3c79457b4525250c6c63458;hpb=a1e8b148970121c8f944f5abb2b85cca59090366;p=blog.git diff --git a/Makefile b/Makefile index b8a0e31..a5cc351 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,29 @@ ## Makefile to export org in blog file to html emacs ?= emacs -OUTDIR := "" +OUTDIR := FORCE := "no" +BLOGDIR := $(PWD) all: $(emacs) -Q --script blog.el $(OUTDIR) $(FORCE) +# used for automation on server update: - git pull - $(emacs) -Q --script blog.el $(OUTDIR) + git pull && $(emacs) -Q --script blog.el "~/www/html" "true" + +publish: + $(emacs) -Q --batch -l my-publish.el index.org \ + --eval '(setq debug-on-error t)' \ + --eval '(blog-setup-project-alist "$(BLOGDIR)" "$(OUTDIR)")' \ + --eval '(org-publish-current-project)' + +# test will force publishing all files in the porject +test: + $(emacs) -Q --batch -l my-publish.el index.org \ + --eval '(setq debug-on-error t)' \ + --eval '(blog-setup-project-alist "$(BLOGDIR)"' \ + --eval '(org-publish-current-project t)' clean: rm -rf _site/*