aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-10-24 20:53:08 +0200
committermetamuffin <metamuffin@disroot.org>2025-10-24 20:53:08 +0200
commite67d2d03f9e2d66a24a6b7561146af589e019891 (patch)
treed776ae10122b569f6d8faf36cd01088ce1231afc /makefile
parent1e5dc0dee2fed17d6cc5c0e98edbb9b72daa6345 (diff)
downloadhurrycurry-e67d2d03f9e2d66a24a6b7561146af589e019891.tar
hurrycurry-e67d2d03f9e2d66a24a6b7561146af589e019891.tar.bz2
hurrycurry-e67d2d03f9e2d66a24a6b7561146af589e019891.tar.zst
Localize book html export
Diffstat (limited to 'makefile')
-rw-r--r--makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/makefile b/makefile
index 723473c8..f09a586f 100644
--- a/makefile
+++ b/makefile
@@ -28,7 +28,7 @@ DISCOVER = target/release/hurrycurry-discover
EDITOR = target/release/hurrycurry-editor
ALL_TESTCLIENT = test-client/main.js $(patsubst locale/%.ini,test-client/locale/%.json,$(wildcard locale/*.ini))
-ALL_BOOK = target/book/book.html
+ALL_BOOK = target/book/book.html $(patsubst locale/%.ini,target/book/book.%.html,$(wildcard locale/*.ini))
ALL_SERVER = $(SERVER) $(TOOLS) $(REPLAYTOOL) $(EDITOR) $(DISCOVER) $(LOCALE_EXPORT)
ALL_CLIENT = client/.godot/import-finished client/icons/adaptive-background.png client/icons/adaptive-foreground.png
ALL_DATA = data/recipes/none.yaml data/recipes/anticurry.yaml data/recipes/default.yaml
@@ -54,8 +54,8 @@ target/book/tiles/done: target/book/tiles/list client/.godot/import-finished
$(CLIENT) --render-tiles ../$< --render-output ../$(dir $@) --render-resolution 512; touch $@
target/book/items/done: target/book/items/list client/.godot/import-finished
$(CLIENT) --render-items ../$< --render-output ../$(dir $@) --render-resolution 512; touch $@
-target/book/book.html: target/book/tiles/done target/book/items/done $(BOOK_EXPORT) $(ALL_DATA)
- $(BOOK_EXPORT) -f html -m 5star > $@~ && cp $@~ $@
+target/book/book.%.html: target/book/tiles/done target/book/items/done $(BOOK_EXPORT) $(ALL_DATA) locale/en.ini locale/%.ini
+ $(BOOK_EXPORT) -l $(shell basename -s .html $@ | cut -d '.' -f 2) -f html -m 5star > $@~ && cp $@~ $@
data/recipes/none.yaml:
echo > $@