browser: caniuse data from github repository
[sheet.git] / Makefile
index 1fb2ac5fc1a3050f4b30d21c575b33b4cc13e3e1..804bba7719503b9a1b2bb1ca30be753d4e82bf0b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 all: digraphs.inc.pl unicode-cover.inc.pl countries.inc.pl data/browser/support.inc.pl termcol-xcolor.inc.pl
 more: all data/digraphs-xorg.inc.pl
 
-download: data/DerivedAge.txt data/rfc1345.txt data/xorg-compose data/countryInfo.txt data/caniuse.json
+download: data/DerivedAge.txt data/rfc1345.txt data/xorg-compose data/countryInfo.txt data/browser/caniuse
 .PHONY: download
 
 data/DerivedAge.txt:
@@ -82,10 +82,12 @@ data/countryInfo.txt:
 countries.inc.pl: tools/mkcountries-geonames data/countryInfo.txt
        $< $(word 2,$^) >$@
 
-data/caniuse.json:
-       tools/wget-ifmodified http://caniuse.com/data.json $@
+data/browser/caniuse/data.json: data/browser/caniuse
+data/browser/caniuse:
+       [ -r $@/.git ] && cd $@ && git pull --ff-only
+       @[ -e $@ ] || git clone https://github.com/Fyrd/caniuse.git $@
 
-data/browser/support.inc.pl: tools/mkcaniuse data/caniuse.json
+data/browser/support.inc.pl: tools/mkcaniuse data/browser/caniuse/data.json
        $< $(word 2,$^) >$@
 
 clean: