X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/84155e2ebd54bd2dd07d1a920894496db75707c1..651e4bfa3cc349373e8f9adfd068ff6a6476b153:/Makefile diff --git a/Makefile b/Makefile index aaf9283..138be91 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -all: sitemap.xml light.css plan.plp UPDATE 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 UPDATE 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 cache more: all .PHONY: force # applied to download after 2 hours @@ -23,7 +23,8 @@ plan.plp: TODO UPDATE: $(download) $(call cmdsave,git log -1 --date=short --pretty="%ad %s") -word: word/put.min.js data/wordlist.en.json data/wordlist.nl.json data/wordlist.ru.json data/wordpairs.json +cache: data/writing-latn.json +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) tools/wget-ifmodified https://github.com/kriszyp/put-selector/raw/master/put.js $@ @@ -81,12 +82,14 @@ 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 -data/wordlist.en.inc.pl: tools/mkwordlist data/wordlist.version.txt +data/wordlist.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/%.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)' >$@ @@ -105,7 +108,7 @@ data/font/droidserif.ttf: data/font/free%.ttf: find /usr/share/fonts/truetype/freefont/ -iname "$(@F)" | head -1 | xargs -i ln -sf {} $@ data/font/roboto.ttf: - ln -sf /usr/share/fonts/truetype/roboto/Roboto-Regular.ttf $@ + ln -sf /usr/share/fonts/truetype/roboto/unhinted/RobotoTTF/Roboto-Regular.ttf $@ data/font/noto%.ttf: find /usr/share/fonts/truetype/noto/ -iname "Noto$(*F)-Regular.ttf" | head -1 | xargs -i ln -sf {} $@ @@ -158,8 +161,3 @@ clean: -rm data/browser/support.inc.pl -rm data/browser/usage-wm.inc.pl -.SECONDEXPANSION: - -data/writing-latn.inc.pl: tools/perlinc-static $$(@F) - $(call cmdsave,$^) -