File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
latest.json
2
2
* .spellchecked
3
+ * .checkedvalid
3
4
* .bak
Original file line number Diff line number Diff line change 3
3
OUTFILE = latest.json
4
4
PRODUCT = ipm
5
5
CONVERT = ./tools/convert.sh
6
+ JSONSH = ./JSON.sh/JSON.sh
6
7
INPUTS = $(shell ls -1 "$(PRODUCT ) "/* .md)
7
8
8
9
EGREP = grep -E
@@ -15,20 +16,28 @@ ASPELL_OUT_NOTERRORS = (^[ \t]*[\*\@]|^$$)
15
16
16
17
all : $(OUTFILE )
17
18
18
- check : spellcheck
19
+ check : spellcheck check-json
19
20
20
21
clean :
21
- rm -f $(OUTFILE ) $(addsuffix .spellchecked, $(INPUTS ) )
22
+ rm -f $(OUTFILE ) $(addsuffix .spellchecked, $(INPUTS ) ) $( OUTFILE ) .checkedvalid
22
23
# Interactive aspell leaves older copies of checked files; with Git we do not need them:
23
24
rm -f $(addsuffix .bak, $(INPUTS ) )
24
25
25
26
$(OUTFILE ) : $(INPUTS )
26
27
$(CONVERT ) " $( PRODUCT) " " $( OUTFILE) "
27
28
29
+ check-json : $(OUTFILE ) .checkedvalid
30
+
31
+ $(OUTFILE ) .checkedvalid : $(OUTFILE )
32
+ rm -f " $@ "
33
+ $(JSONSH ) -N -P < " $<" > /dev/null && echo " JSON-OK $<" >&2 || { echo " JSON-FAIL $<" >&2 ; exit 1; }
34
+ touch " $@ "
35
+
28
36
spellcheck : $(addsuffix .spellchecked, $(INPUTS ) )
29
37
30
38
# Ported from NUT
31
39
% .spellchecked : %
40
+ @rm -f " $@ "
32
41
@test -s " $<"
33
42
@echo " SPELLCHECK $<" ; \
34
43
OUT=" ` (sed ' s,^\(.*\)$$, \1,' | \
You can’t perform that action at this time.
0 commit comments