X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/10ebd7e89e3735dc1659c7ef01c2155694f8ba81..3f38a7192491a73a1527179cdd68218f023aed61:/Makefile diff --git a/Makefile b/Makefile index 19fe1d1..217fe13 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") +UPDATE: .git + $(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