From 9dc1797c1534aa8ef1e86bed29e3f0f0dc3f8e88 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 25 Jul 2024 18:56:03 +0200 Subject: Add native-language country names --- GNUmakefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index b1cdd28..6807748 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -43,9 +43,9 @@ eurocddeps := $(subst xyz,dcoins,$(euroxyzdeps)) data/coins euronddeps := $(subst xyz,dnotes,$(euroxyzdeps)) data/notes data/note-info 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) - +# Macros to get data to pass to m4 +altnames = $(shell awk 'BEGIN { FS = "\t" } $$1 == toupper("$1") { print $$4 }' data/country-info) +demonym = $(shell awk 'BEGIN { FS = "\t" } $$1 == toupper("$1") { print $$2 }' data/country-info) percentage = $(shell ./scripts/gen-stats $1) # Macros to handle dependencies for world pages @@ -67,7 +67,9 @@ out/%.html: src/%.gsp $(gspdeps) m4 -P lib.m4 $< | gsp >$@ $(eurocc): out/euro/%/index.html: $(gspdeps) $(euroccdeps) - m4 -P -D__coins -D__code=$* -D__demonym=$(call demonym,$*) \ + m4 -P -D__coins -D__code=$* \ + -D__demonym="$(call demonym,$*)" \ + -D__altnames="$(call altnames,$*)" \ -D__percentage="$(call percentage,$*)" \ lib.m4 src/euro/index.ccoins.gsp | gsp >$@ -- cgit v1.2.3