diff options
author | Thomas Letan <lthms@soap.coffee> | 2020-02-23 16:23:31 +0100 |
---|---|---|
committer | Thomas Letan <lthms@soap.coffee> | 2020-02-23 16:23:31 +0100 |
commit | e5480d5c080fd1155844c24bb97fdc72e54ac5a4 (patch) | |
tree | e171c5754683985718fc9b96e024ec6f98047592 /site/cleopatra/Contents/Org.org | |
parent | Integrate the scripts and plugins used by soupault in Soupault.org (diff) |
Provide a rule to initialize Emacs packages
This allows for using make built-in parallel builds, using e.g. `make
-j4'.
Diffstat (limited to 'site/cleopatra/Contents/Org.org')
-rw-r--r-- | site/cleopatra/Contents/Org.org | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/site/cleopatra/Contents/Org.org b/site/cleopatra/Contents/Org.org index 06bf369..ca311f5 100644 --- a/site/cleopatra/Contents/Org.org +++ b/site/cleopatra/Contents/Org.org @@ -2,7 +2,7 @@ * Under the Hood -#+BEGIN_SRC emacs-lisp :tangle scripts/export-org.el +#+BEGIN_SRC emacs-lisp :tangle scripts/packages.el (require 'package) (setq user-emacs-directory (concat (getenv "ROOT") "/emacs.d")) @@ -16,11 +16,7 @@ (package-refresh-contents)) (defun ensure-package-installed (&rest packages) - "Ensure every PACKAGES is installed. - -Ask for installation if it’s -not. Return a list of installed packages or nil for every skipped -package." + "Ensure every PACKAGES is installed." (mapcar (lambda (package) (if (package-installed-p package) @@ -40,9 +36,13 @@ package." (use-package github-modern-theme :ensure t :defer t :init (load-theme 'github-modern t)) + +(provide 'packages) #+END_SRC #+BEGIN_SRC emacs-lisp :tangle scripts/export-org.el +(require 'packages) + (org-babel-do-load-languages 'org-babel-load-languages'((shell . t))) (setq org-src-preserve-indentation t) (setq org-confirm-babel-evaluate nil) @@ -53,13 +53,24 @@ package." #+BEGIN_SRC makefile :tangle org.mk ORG_POSTS := $(shell find site/ -name "*.org") -CONTENTS += $(ORG_POSTS:.org=.html) +EXPORT := --directory="${ROOT}/scripts/" --batch \ + --load="${ROOT}/scripts/export-org.el" \ + 2>> build.log + +INIT := --batch --load="${ROOT}/scripts/packages.el" \ + 2>> build.log -EXPORT := --batch --load="${ROOT}/scripts/export-org.el" 2>> build.log +.emacs : scripts/packages.el + @echo " init emacs configuration" + @${EMACS} ${INIT} + @touch $@ -%.html : %.org scripts/export-org.el +%.html : %.org scripts/packages.el scripts/export-org.el .emacs @echo " export $*.org" @${EMACS} $< ${EXPORT} + +CONTENTS += $(ORG_POSTS:.org=.html) +GENFILES += .emacs emacs.d #+END_SRC #+BEGIN_SRC sass :tangle site/style/org.sass |