X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/b828085578158fe94874f39369754fcc5e0113a3..682883c393a571b058b75bc2e493f5722945a448:/Makefile?ds=inline diff --git a/Makefile b/Makefile index 7db808b..502c655 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ -all: sitemap.xml light.css plan.plp UPDATE data cache +all: sitemap.xml style 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)) # atomically create file by command -cmdsave = @echo '$1' $2 \>$@; mispipe '$1 $2' 'ifne sponge $@' +cmdsave = @echo "$1" $2 \>$@; mispipe "$1 $2" 'ifne sponge $@' # download git checkout gitsave = @if cd $@ 2>/dev/null; \ then echo git pull $@; git pull -q --ff-only || true; \ @@ -13,14 +13,15 @@ gitsave = @if cd $@ 2>/dev/null; \ sitemap.xml: tools/mksitemap $(call cmdsave,$<) -light.css: tools/stripcss base.css - $(call cmdsave,$^) +style: light.css sc.css +%.css: style/%.scss $(wildcard style/_*.scss) + $(call cmdsave,sassc -t compressed $< | perl -pE 's/\}+\K/\n/g') plan.plp: TODO kramdown $< >$@ UPDATE: $(download) - $(call cmdsave,git log -1 --date=short --pretty="%ad %s") + $(call cmdsave,git log -1 --date=short --pretty='%ad %s') 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 @@ -86,6 +87,11 @@ data/xcolors: $(download) data/termcol-xcolor.inc.pl: tools/mktermcol-xcolor data/xcolors/themes $(call cmdsave,$^/*) +data/camels.pexels-4321178.jpg: + tools/wget-ifmodified https://images.pexels.com/photos/4321178/pexels-photo-4321178.jpeg $@ +data/camels.jpg: data/camels.pexels-4321178.jpg + tools/mkimgthumb --jpg 800x400 'data/camels.smaller:-area:0x225.jpg' . + data/wordlist.version.txt: force @[ -e $@ ] || date -Is >$@ tools/lastword $@ || true