summaryrefslogtreecommitdiffstats
path: root/site/cleopatra/literate-programming.org
diff options
context:
space:
mode:
authorThomas Letan <lthms@soap.coffee>2020-12-10 14:15:24 +0100
committerThomas Letan <lthms@soap.coffee>2020-12-10 14:15:24 +0100
commit2706544cf000a6f9875e81f86d885d4dc68dfb23 (patch)
tree5c1cf8ce1f5704dabef5e55353a3f9196894eb1a /site/cleopatra/literate-programming.org
parenta611c4e22b5425a0e79604a601ef93f4db51d679 (diff)
Add a Series on coqffi, and the first literate program of this blog
Diffstat (limited to 'site/cleopatra/literate-programming.org')
-rw-r--r--site/cleopatra/literate-programming.org42
1 files changed, 42 insertions, 0 deletions
diff --git a/site/cleopatra/literate-programming.org b/site/cleopatra/literate-programming.org
new file mode 100644
index 0000000..7310864
--- /dev/null
+++ b/site/cleopatra/literate-programming.org
@@ -0,0 +1,42 @@
+#+BEGIN_EXPORT html
+<h1>Literate Programming Projects</h1>
+#+END_EXPORT
+
+#+BEGIN_SRC makefile :tangle literate-programming.mk
+literate-programming-prebuild :
+ @cleopatra echo "Tangling" "literate programming project"
+ @cleopatra exec -- cleopatra-run-elisp export-lp.el >> build.log
+
+org-build : literate-programming-build
+
+COQFFI_ARCHIVE := site/files/coqffi-tutorial.tar.gz
+
+coqffi-tutorial-build : literate-programming-prebuild
+ @cleopatra echo "Building" "coqffi tutorial"
+ @cd lp/coqffi-tutorial; dune build --display quiet
+ @cleopatra echo "Archiving" "coqffi tutorial"
+ @rm -f ${COQFFI_ARCHIVE}
+ @tar --exclude="_build" -czvf ${COQFFI_ARCHIVE} lp/coqffi-tutorial >> build.log
+
+literate-programming-build : coqffi-tutorial-build
+
+ARTIFACTS += lp/ ${COQFFI_ARCHIVE} site/posts/deps.svg
+
+#+END_SRC
+
+#+BEGIN_SRC emacs-lisp :tangle export-lp.el
+(cleopatra:configure)
+
+(org-babel-do-load-languages
+ 'org-babel-load-languages
+ '((shell . t)))
+
+(setq org-publish-project-alist
+ '(("lp"
+ :base-directory "site/posts"
+ :publishing-directory "lp"
+ :recursive t
+ :publishing-function cleopatra:tangle-publish)))
+
+(org-publish-all)
+#+END_SRC