X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/9e7638a0a6d9dfa09dfe6ae304ace1b364be738a..53d46a1b9a53afd1f4e9e639e9d3e0fb2a512f3d:/Makefile diff --git a/Makefile b/Makefile index 2b1c531..961f472 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 word +all: sitemap.xml light.css plan.plp 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,7 +17,15 @@ sitemap.xml: tools/mksitemap light.css: tools/stripcss base.css $(call cmdsave,$^) -word: data/wordlist.en.json data/wordlist.nl.json data/wordlist.ru.json +plan.plp: TODO + kramdown $< >$@ + +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) $@ @@ -70,9 +78,12 @@ 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/wordlist.%.json: data/wordlist.%.inc.pl +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: find /usr/share/fonts/truetype/ ~/.fonts/ -iname "$(@F)" | head -1 | xargs -i ln -sf {} $@