Skip to content

Commit

Permalink
Add Makefile target to validate JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
ThinkOpenly committed Jun 17, 2024
1 parent 5f41034 commit acef250
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ all: ocaml_emulator/riscv_ocaml_sim_$(ARCH) c_emulator/riscv_sim_$(ARCH)
json: $(SAIL_SRCS) model/main.sail Makefile
@sail -json $(SAIL_FLAGS) $(SAIL_SRCS)

.PHONY: check-json
check-json:
sail -json $(SAIL_FLAGS) $(SAIL_SRCS) | python3 -c "import json; import sys; j=json.load(sys.stdin)"

output: $(SAIL_SRCS) model/main.sail Makefile
sail -output-sail $(SAIL_FLAGS) $(SAIL_SRCS)

Expand Down

0 comments on commit acef250

Please sign in to comment.