summaryrefslogtreecommitdiff
path: root/deps.mk
diff options
context:
space:
mode:
Diffstat (limited to 'deps.mk')
-rw-r--r--deps.mk16
1 files changed, 13 insertions, 3 deletions
diff --git a/deps.mk b/deps.mk
index 194e80f..e8c3b1f 100644
--- a/deps.mk
+++ b/deps.mk
@@ -1683,7 +1683,7 @@ FFMFLAGS = -y -hide_banner -loglevel warning
mkwb feedentry $< > $@
.json.comments:
- mkwb comments $< > $@
+ mkwb comments -d src/comments.data $< > $@
.json.mapentry:
mkwb mapentry $< > $@
@@ -1821,6 +1821,7 @@ derived-assets = \
$(sources.caslinks) \
$(sources.comments) \
src/comments.sentinel \
+ src/comments.data \
$(sources.mapentry) \
src/global.json \
$(translations.txt) \
@@ -1921,8 +1922,17 @@ src/comments.sentinel: src/comments.mbox
## cannot name in advance. Which archives those are is $comments_json
## in the site's own config, written out above; a site that holds no
## such discussion names none and waits on nothing.
-$(sources.comments): src/comments.sentinel $(comments.map)
-$(sources.comments): $(comments.archives)
+## Reading the comments is the same work whichever page asked for it
+## --- every .eml parsed, every body decoded out of quoted-printable
+## --- so it happens once here and the pages read what it wrote. The
+## sources are named as prerequisites of the corpus alone: a page waits
+## on the corpus, and the corpus waits on them.
+src/comments.data: src/comments.sentinel $(comments.map)
+src/comments.data: $(comments.archives) src/global.json
+src/comments.data:
+ mkwb commentsdata src/global.json > $@
+
+$(sources.comments): src/comments.data
## A page renders the thread belonging to it, and the site names
## which .comments that is, page by page. Every page waiting on