X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/1477e69ae3580c3a17ad23d1123357efe0208f93..20500d885f632dc1d88e69f7e7750b84054410bd:/Makefile diff --git a/Makefile b/Makefile index be3a2d8..7d1e2e3 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +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 -more: all +all: sitemap.xml light.css plan.plp UPDATE data cache .PHONY: force # applied to download after 2 hours download := $(shell [ -z $$(find data/download -mmin -120) ] && (touch data/download && echo force)) @@ -17,6 +16,22 @@ sitemap.xml: tools/mksitemap light.css: tools/stripcss base.css $(call cmdsave,$^) +plan.plp: TODO + kramdown $< >$@ + +UPDATE: $(download) + $(call cmdsave,git log -1 --date=short --pretty="%ad %s") + +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) + tools/wget-ifmodified https://github.com/kriszyp/put-selector/raw/master/put.js $@ +word/%.min.js: word/%.js + uglifyjs -m '' $< -o $@ + +data: 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 data/unicode-sampler word + data/DerivedAge.txt: $(download) tools/wget-ifmodified http://www.unicode.org/Public/UNIDATA/$(@F) $@ @@ -34,20 +49,24 @@ data/digraphs-shiar.inc.pl: tools/mkdigraphs-shiar shiar.inc.txt data/xorg-compose: $(download) tools/wget-ifmodified http://cgit.freedesktop.org/xorg/lib/libX11/plain/nls/en_US.UTF-8/Compose.pre $@ - data/digraphs-xorg.inc.pl: tools/mkdigraphs-xorg data/xorg-compose $(call cmdsave,$^) data/digraphs-vim.inc.pl: tools/mkdigraphs-vim $(call cmdsave,$<) +data/digraphs-plan9.txt: + tools/wget-ifmodified https://9fans.github.io/usr/local/plan9/lib/keyboard $@ +data/digraphs-plan9.inc.pl: tools/mkdigraphs-plan9 data/digraphs-plan9.txt + $(call cmdsave,$^) + data/digraphs.inc.pl: tools/mkdigraphlist data/digraphs-rfc.inc.pl data/digraphs-vim.inc.pl data/digraphs-shiar.inc.pl data/unicode-char.inc.pl $(call cmdsave,$<) data/unicode-char.inc.pl: tools/mkcharinfo data/digraphs-rfc.inc.pl data/digraphs-shiar.inc.pl data/unicode-age.inc.pl unicode-table.inc.pl $(call cmdsave,$<) -data/font/%.inc.pl: tools/mkttfinfo data/font/%.ttf +data/font/%.inc.pl: tools/mkttfinfo data/font/%.ttf #TODO ttc $(call cmdsave,$^) || true data/unicode-sampler: $(download) @@ -62,12 +81,19 @@ 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.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 + tools/wordpairs >$@ .SECONDARY: data/font/%.ttf data/font/%.ttf: @@ -83,7 +109,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 {} $@ @@ -136,8 +162,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,$^) -