summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-10-14 13:42:53 +0200
committermetamuffin <metamuffin@disroot.org>2024-10-14 13:42:53 +0200
commitbb9fd6b36d39bc5fe6f162f2df887bba3d036095 (patch)
tree6b9a6894175f7233b28c66e9dcff7d476b9f2def
parent09ffe69be75185fce1e18595f1f38a4ce1f30132 (diff)
downloadhurrycurry-bb9fd6b36d39bc5fe6f162f2df887bba3d036095.tar
hurrycurry-bb9fd6b36d39bc5fe6f162f2df887bba3d036095.tar.bz2
hurrycurry-bb9fd6b36d39bc5fe6f162f2df887bba3d036095.tar.zst
fix parallel compilation problems
-rw-r--r--book/GNUmakefile6
-rw-r--r--data/makefile4
2 files changed, 9 insertions, 1 deletions
diff --git a/book/GNUmakefile b/book/GNUmakefile
index ab753255..4467822b 100644
--- a/book/GNUmakefile
+++ b/book/GNUmakefile
@@ -7,16 +7,18 @@ langs = $(patsubst locale/%.ini,%,$(wildcard locale/*.ini))
s_pages = 01,02,03,04,05,06,07,08,09,10,11
s_langs = $(subst $(space),$(comma),$(langs))
png_pages = $(shell echo out/book_{$(s_pages)}.{$(s_langs)}.png)
-webp_pages = $(shell echo out/book_{$(s_pages)}.{$(s_langs)}.webp)
svg_pages = $(shell echo out/book_{$(s_pages)}.{$(s_langs)}.svg)
+webp_pages = $(shell echo out/book_{$(s_pages)}.{$(s_langs)}.webp)
pdfs = $(shell echo out/book.{$(s_langs)}.pdf)
+MOST = $(pdfs)
ALL = out/book.webp.tar.zst out/book.svg.tar.zst \
$(pdfs) $(png_pages) $(webp_pages) $(svg_pages)
JSR = deno run
.PHONY: all
+most: $(MOST)
all: $(ALL)
out:
@@ -25,8 +27,10 @@ out:
book.json: book.js
DENO_NO_UPDATE_CHECK=1 $(JSR) $< > $@
+$(wordlist 2,99,$(png_pages)): $(word 1,$(png_pages))
out/book_01.%.png: book.typ book.json locale/%.ini out
typst compile --input lang=$(subst out/,,$(*)) $< out/book_\{n\}.$(subst out/,,$(*)).png
+$(wordlist 2,99,$(svg_pages)): $(word 1,$(svg_pages))
out/book_01.%.svg: book.typ book.json locale/%.ini out
typst compile --input lang=$(subst out/,,$(*)) $< out/book_\{n\}.$(subst out/,,$(*)).svg
out/book.%.pdf: book.typ book.json locale/%.ini out
diff --git a/data/makefile b/data/makefile
index a5041803..fe4ab583 100644
--- a/data/makefile
+++ b/data/makefile
@@ -20,8 +20,12 @@ graphs: recipes/default.svg
JSR = deno run
+../book/book.json: ../book/book.js
+ make -C ../book book.json
+
book.json: ../book/book.json
cp $< $@
+
recipes/none.yaml:
echo > $@
recipes/anticurry.yaml: recipes/default.yaml