X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/50442220cc52bad55c1003de34f8dada958650d5..HEAD:/Makefile diff --git a/Makefile b/Makefile index 7388647..df6cbe5 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +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 -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)) @@ -23,13 +22,16 @@ plan.plp: TODO UPDATE: $(download) $(call cmdsave,git log -1 --date=short --pretty="%ad %s") -word: word/put.min.js data/wordlist.inc.pl data/wordlist.en.json data/wordlist.nl.json data/wordlist.ru.json data/wordpairs.json +cache: $(patsubst %.inc.pl,data/%.json,$(wildcard charset-*.inc.pl) $(wildcard keyboard/altgr/*.inc.pl) writing-latn.inc.pl) +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: data/digraphs.json data/unicode-cover.inc.pl data/countries.inc.pl data/browser data/termcol-xcolor.inc.pl data/digraphs-xorg.json data/unicode-sampler word + data/DerivedAge.txt: $(download) tools/wget-ifmodified http://www.unicode.org/Public/UNIDATA/$(@F) $@ @@ -46,8 +48,12 @@ data/digraphs-shiar.inc.pl: tools/mkdigraphs-shiar shiar.inc.txt $(call cmdsave,$^) 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 + tools/wget-ifmodified http://gitlab.freedesktop.org/xorg/lib/libx11/-/raw/master/nls/en_US.UTF-8/Compose.pre $@ +data/keysymdef.h: $(download) + tools/wget-ifmodified http://gitlab.freedesktop.org/xorg/proto/xorgproto/-/raw/master/include/X11/$(@F) $@ +data/keysymdef.json: tools/mkxkeysymdef data/keysymdef.h + $(call cmdsave,$^) +data/digraphs-xorg.json: tools/mkdigraphs-xorg data/xorg-compose data/keysymdef.json $(call cmdsave,$^) data/digraphs-vim.inc.pl: tools/mkdigraphs-vim @@ -58,13 +64,13 @@ data/digraphs-plan9.txt: 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 +data/digraphs.json: 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) @@ -79,17 +85,17 @@ 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,$<) 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])" ./$<) + $(call cmdsave,tools/mkjson $<) +data/%.json: %.inc.pl + $(call cmdsave,tools/mkjson $<) 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: @@ -105,7 +111,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 {} $@ @@ -150,7 +156,7 @@ data/browser/usage-wm.inc.pl: tools/mkusage-wikimedia data/browser/usage-wm.tsv $(call cmdsave,$^) clean: - -rm data/digraphs.inc.pl + -rm data/digraphs.json -rm data/unicode-char.inc.pl -rm data/unicode-age.inc.pl -rm -rf data/font/ @@ -158,8 +164,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,$^) -