summaryrefslogtreecommitdiffhomepage
path: root/GNUmakefile
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-07-18 22:01:30 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-07-18 22:01:30 +0200
commit07ae048ae71387ad39e07841d1c3eb76ce0736ee (patch)
tree1dd4ac8c4d9b6d8dfc657439c346a344679149f8 /GNUmakefile
parentb281398a897736aef922468107f419e3590388a4 (diff)
Add completion percentages to each page
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile
index c5cb884..31ff619 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -46,6 +46,8 @@ eurotndeps := src/euro/index.tnotes.gsp src/euro/nav.dnotes.gsp data/notes
# Macro to get a countries demonym from their country code
demonym = $(shell awk '$$1 == toupper("$1") { print $$2 }' data/country-info)
+percentage = $(shell ./scripts/gen-stats $1)
+
# Macros to handle dependencies for world pages
wpath = $(if $(filter $2,o),\
out/world/$(if $(filter $2,c),coins,notes)/$1/index.html,\
@@ -66,6 +68,7 @@ out/%.html: src/%.gsp $(gspdeps)
$(eurocc): out/euro/%/index.html: $(gspdeps) $(euroccdeps)
m4 -P -D__coins -D__code=$* -D__demonym=$(call demonym,$*) \
+ -D__percentage="$(call percentage,$*)" \
lib.m4 src/euro/index.ccoins.gsp | gsp >$@
$(eurocd): out/euro/%/index.html: $(eurocddeps) $(gspdeps)