mplayer: link mpv subpage, distinguish metadata
[sheet.git] / Makefile
index 77c9cb0e6d6fb833805d1740ed3dc4440205f5d2..20458be5677899ed862f665e0a4f863cb159ead4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ plan.plp: TODO
 UPDATE: $(download)
        $(call cmdsave,git log -1 --date=short --pretty="%ad    %s")
 
-cache: data/writing-latn.json
+cache: $(patsubst %.inc.pl,data/%.json,$(wildcard charset-*.inc.pl) writing-latn.inc.pl)
 word: word/put.min.js data/wordlist.inc.pl data/wordlist.en.json data/wordlist.nl.json data/wordlist.ru.json data/wordpairs.json
 
 word/put.js: $(download)
@@ -80,7 +80,7 @@ data/termcol-xcolor.inc.pl: tools/mktermcol-xcolor data/xcolors/themes
 
 data/wordlist.version.txt: force
        @[ -e $@ ] || date -Is >$@
-       @perl -ni -I. -MShiar_Sheet::DB -E 'say (Shiar_Sheet::DB->connect->select(word => "max(updated)", \["updated>?", $$_])->list or exit 1)' $@ || true
+       tools/lastword $@ || true
 
 data/wordlist.inc.pl: tools/mkwordlist data/wordlist.version.txt
        $(call cmdsave,$<)
@@ -92,7 +92,7 @@ data/%.json: %.inc.pl
        $(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)' >$@
+       tools/wordpairs >$@
 
 .SECONDARY: data/font/%.ttf
 data/font/%.ttf: