diff options
| author | Robert Norton | 2018-05-09 16:30:46 +0100 |
|---|---|---|
| committer | Robert Norton | 2018-05-09 16:58:19 +0100 |
| commit | 680acef72a84b1d3810ffd88c06639bafd1d4b3a (patch) | |
| tree | 77dbde83be6e172d7167c53634d319cdc041a818 /riscv/Makefile | |
| parent | 3f472931d1f0d003c729d591b13619376ea93cf3 (diff) | |
Add targets for counting lines in mips, cheri and riscv. Can use either sloccount or cloc. sloccount seems to be reliable but lacks a way to tell it that sail files can be treated like ocaml without renaming the files. cloc has a nicer interface is lower quality in other regards like broken ocaml support in versions shipped with Ubuntu (e.g. treats {...} as comment, no nested comments support). For sail2 syntax this is OK because we use the C parser instead which gives the same results as sloccount.
Diffstat (limited to 'riscv/Makefile')
| -rw-r--r-- | riscv/Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/riscv/Makefile b/riscv/Makefile index 781ec354..3cd235a7 100644 --- a/riscv/Makefile +++ b/riscv/Makefile @@ -34,6 +34,13 @@ Riscv.thy: riscv.lem riscv_extras.lem riscv.lem: $(SAIL_SRCS) Makefile $(SAIL_DIR)/sail -lem -o riscv -lem_mwords -lem_lib Riscv_extras $(SAIL_SRCS) +# we exclude prelude.sail here, most code there should move to sail lib +LOC_FILES:=$(SAIL_SRCS) main.sail +include ../etc/loc.mk + +cloc: $(LOC_FILES) + cloc --by-file --force-lang C,sail $^ + clean: -rm -rf riscv _sbuild -rm -f riscv.lem riscv_types.lem |
