tools/mkjson: indent objects but not arrays
[sheet.git] / Makefile
index f48ffa7301aff2bf96ec135be52e64b525aae8c3..806e5be18c1cc0cfde73473b31ae3f23ebc923cd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,7 @@ plan.plp: TODO
 UPDATE: $(download)
        $(call cmdsave,git log -1 --date=short --pretty="%ad    %s")
 
-cache: $(patsubst %.inc.pl,data/%.json,$(wildcard charset-*.inc.pl) writing-latn.inc.pl)
+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)
@@ -86,9 +86,9 @@ data/wordlist.version.txt: force
 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,perl -MJSON -E "print JSON->new->utf8->canonical->encode(do \$$ARGV[0])" ./$<)
+       $(call cmdsave,tools/mkjson $<)
 
 data/wordpairs.inc.pl: data/wordlist.version.txt
        tools/wordpairs >$@