X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/1477e69ae3580c3a17ad23d1123357efe0208f93..f41031bd19fd54229e1efb846254b5afdbd4331f:/Makefile diff --git a/Makefile b/Makefile index be3a2d8..2e2b80a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -all: sitemap.xml light.css data/digraphs.inc.pl data/unicode-cover.inc.pl data/countries.inc.pl data/browser data/termcol-xcolor.inc.pl data/digraphs-xorg.inc.pl +all: sitemap.xml light.css data/digraphs.inc.pl data/unicode-cover.inc.pl data/countries.inc.pl data/browser data/termcol-xcolor.inc.pl data/digraphs-xorg.inc.pl word more: all .PHONY: force # applied to download after 2 hours @@ -17,6 +17,13 @@ sitemap.xml: tools/mksitemap light.css: tools/stripcss base.css $(call cmdsave,$^) +word: word/put.min.js data/wordlist.en.json data/wordlist.nl.json data/wordlist.ru.json data/wordpairs.json + +word/put.js: $(download) + tools/wget-ifmodified https://github.com/kriszyp/put-selector/raw/master/put.js $@ +word/%.min.js: word/%.js + uglifyjs -m '' $< -o $@ + data/DerivedAge.txt: $(download) tools/wget-ifmodified http://www.unicode.org/Public/UNIDATA/$(@F) $@ @@ -68,6 +75,11 @@ data/wordlist.en.inc.pl: tools/mkwordlist data/wordlist.version.txt $(call cmdsave,$<) data/wordlist.%.inc.pl: tools/mkwordlist data/wordlist.version.txt $(call cmdsave,$< $*) +data/word%.json: data/word%.inc.pl + $(call cmdsave,perl -MJSON=encode_json -E "print encode_json(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)' >$@ .SECONDARY: data/font/%.ttf data/font/%.ttf: