latin: group aliases similar to termcol ea
[sheet.git] / Makefile
index 75f269b81c478281499b4abfc9d75470a402262d..138be91eaa98aa1d72fc1cefa9494641e7b89630 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -89,7 +89,7 @@ data/wordlist.%.inc.pl: tools/mkwordlist data/wordlist.version.txt
 data/word%.json: data/word%.inc.pl
        $(call cmdsave,perl -MJSON=encode_json -E "print encode_json(do \$$ARGV[0])" ./$<)
 data/%.json: %.inc.pl
-       $(call cmdsave,perl -MJSON=encode_json -E "print encode_json([ do \$$ARGV[0] ])" ./$<)
+       $(call cmdsave,perl -MJSON -E "print JSON->new->utf8->canonical->encode(do \$$ARGV[0])" ./$<)
 
 data/wordpairs.inc.pl: data/wordlist.version.txt
        @perl -I. -MShiar_Sheet::DB -MData::Dump=pp -E 'say pp(Shiar_Sheet::DB->connect->select("word w JOIN word a ON w.id=a.ref" => "w.id, a.id", {"a.lang"=>undef})->map or exit 1)' >$@