sc: refer to ventral sacs overlord by its common name
[sheet.git] / Makefile
index be94112d33871b845011b49999e24626872fa20a..217fe13b849f6aadb25af1f943dc004822528c05 100644 (file)
--- 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
@@ -30,7 +31,7 @@ word/put.js: $(download)
 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.inc.pl data/unicode-sampler word
+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 keyboard/symbols/unigraph
 
 data/DerivedAge.txt: $(download)
        tools/wget-ifmodified http://www.unicode.org/Public/UNIDATA/$(@F) $@
@@ -53,7 +54,10 @@ 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.inc.pl: tools/mkdigraphs-xorg data/xorg-compose data/keysymdef.json
+data/digraphs-xorg.json: tools/mkdigraphs-xorg data/xorg-compose data/keysymdef.json
+       $(call cmdsave,$^)
+
+keyboard/symbols/%: tools/mkxkbsymbols data/keyboard/altgr/%.eng.json
        $(call cmdsave,$^)
 
 data/digraphs-vim.inc.pl: tools/mkdigraphs-vim
@@ -83,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