Skip to content

Commit 19748ec

Browse files
committed
Add Makefile target to validate JSON
1 parent e94a051 commit 19748ec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ all: ocaml_emulator/riscv_ocaml_sim_$(ARCH) c_emulator/riscv_sim_$(ARCH)
214214
json: $(SAIL_SRCS) model/main.sail Makefile
215215
@sail -json $(SAIL_FLAGS) $(SAIL_SRCS)
216216

217+
.PHONY: check-json
218+
check-json:
219+
sail -json $(SAIL_FLAGS) $(SAIL_SRCS) | python3 -c "import json; import sys; j=json.load(sys.stdin)"
220+
217221
output: $(SAIL_SRCS) model/main.sail Makefile
218222
sail -output-sail $(SAIL_FLAGS) $(SAIL_SRCS)
219223

0 commit comments

Comments
 (0)