commit 728f8890501c7ead2aa40b4ea5ef935948a4b7e3
parent 002347687dd4be1f5c865a21b8f78ccd30022cbd
Author: lou woell <lou@repetitions.de>
Date: Sun, 6 Sep 2026 16:03:07 +0200
add logging to build process
Diffstat:
2 files changed, 35 insertions(+), 18 deletions(-)
diff --git a/lisp/ethics.lisp b/lisp/ethics.lisp
@@ -16,6 +16,7 @@
:versions ("en_elwes" "la_spinoza")))
(defun read-version (key dir tbl)
+ (format t "Reading: ~a~&" key)
(loop :with meta := nil
:for path :in (uiop:directory-files dir)
:as ftype := (pathname-type path)
@@ -35,16 +36,16 @@
(list v))))
:as fname := (car (last (pathname-directory path)))
:as data := (read-version fname path tbl)
- :do (format t "~A~&" path)
- :collect (list
- :key fname
- :path path
- :name (gethash "name" data)
- :translator (gethash "translator" data)
- :language (gethash "language" data)
- :types (gethash "types" data)
- :meta data
- :file (make-pathname :name fname :type "html"))
+ :collect
+ (let ((v (list :key fname
+ :path path
+ :name (gethash "name" data)
+ :translator (gethash "translator" data)
+ :language (gethash "language" data)
+ :types (gethash "types" data)
+ :meta data
+ :file (make-pathname :name fname :type "html"))))
+ (format t "Version: ~S~&" v) v)
:into versions
:finally (return (cons tbl versions))))
@@ -96,7 +97,7 @@
:vkey vkey
:types types))
-(defun write-ethics ()
+(defun write-ethics (config)
(destructuring-bind (ethica &rest versions)
(import-ethics config)
(process-to-file (merge-pathnames #p"index.chtml" (getf config :template-dir))
@@ -104,6 +105,7 @@
:versions versions)
(dolist (version versions)
(let ((key (getf version :key)))
+ (format t "Writing: ~a~&" key)
(process-to-file
(merge-pathnames #p "ethics.chtml" (getf config :template-dir))
(merge-pathnames (getf version :file)
@@ -111,7 +113,6 @@
:tree (gethash "ethica" ethica)
:name (getf version :name)
:vkey key
-
:types (getf version :types))))))
;; --- plumbing
@@ -138,5 +139,5 @@
(defun main ()
(let ((config (parse-args :build-dir :template-dir :data-dir)))
- (print config)
- (write-ethics)))
+ (format t "Arguments: ~a~&" config)
+ (write-ethics config)))
diff --git a/makefile b/makefile
@@ -18,21 +18,37 @@ HTML = $(foreach v, $(VERSIONS), $(BUILD_DIR)/$(v).html)
all: $(HTML)
$(HTML) &: $(DATA_DIR)/* $(DATA_DIR)/meta.json $(TEMPLATE_DIR) $(GEN)
+ @echo ---
+ @echo Generating HTML files.
+ @echo
$(GEN) --data-dir $(DATA_DIR)/\
--build-dir $(BUILD_DIR)/\
--template-dir $(TEMPLATE_DIR)/\
-- $(VERSIONS)
+ @echo ---
$(ARCHIVE): $(SRC_DIRS) $(FILES)
+ @echo ---
+ @echo Generating source archive.
+ @echo
git archive main -o $@
+ @echo ---
$(GEN): lisp/lou.spinoza.ethica.asd lisp/ethics.lisp
- $(LISP) --load 'lisp/lou.spinoza.ethica.asd'\
- --eval '(ql:quickload :lou.spinoza.ethica)'\
- --eval '(asdf:make :lou.spinoza.ethica)'\
- --eval '(quit)'
+ @echo ---
+ @echo Compiling LISP.
+ @echo
+ $(LISP) --load 'lisp/lou.spinoza.ethica.asd'\
+ --eval '(ql:quickload :lou.spinoza.ethica)'\
+ --eval '(asdf:make :lou.spinoza.ethica)'\
+ --eval '(quit)'
+ @echo ---
deploy: $(ARCHIVE) all
+ @echo ---
+ @echo Uploading files.
+ @echo
rsync -rL $(BUILD_DIR)/ repetitions:~/ethica
+ @echo ---
.PHONY: deploy clean