raft/Makefile
Daniel Ziltener 244029a0c8
Initial commit
FossilOrigin-Name: 370c4e8ed3567a4e0f0933ac3ba749973ba041efa3b7d61310a6e5d296e68e21
2023-11-09 01:21:49 +01:00

23 lines
912 B
Makefile

# Tangling and weaving
webdriver.scm webdriver-impl.scm webdriver.html webdriver.egg webdriver.release-info tests/run.scm: webdriver.org
emacs --batch \
--load "vendor/htmlize.el" \
--eval "(setq enable-local-variables :all)" \
--eval "(setq org-confirm-babel-evaluate nil)" \
--eval "(require 'ob-tangle)" \
--eval "(require 'ob-lob)" \
--eval "(require 'htmlize)" \
--file "${.ALLSRC:[1]}" \
-f org-babel-tangle \
-f org-html-export-to-html
mv "${.ALLSRC:[1]:R}.html" "${.ALLSRC:[1]:R}.html.old"
echo "<div class='fossil-doc' data-title='`cat "${.ALLSRC:[1]:R}.html.old" | grep 'class="title"' | sed -e 's/^.*">//' | sed -e 's/<\/h1>//'`'>" > "${.ALLSRC:[1]:R}.html"
cat "${.ALLSRC:[1]:R}.html.old" | sed -e '1,13d' | head -n -2 >> "${.ALLSRC:[1]:R}.html"
echo "</div>" >> "${.ALLSRC:[1]:R}.html"
rm "${.ALLSRC:[1]:R}.html.old"
# Extension Rules
.scm.so:
csc5 -R r7rs -X r7rs -sJ ${.IMPSRC}