summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorJon French2018-05-10 12:49:38 +0100
committerJon French2018-05-10 12:49:38 +0100
commit443601a0d19907d95ed604a68403403d25ceaf73 (patch)
tree289fa06f0583f4a2d1baec471ddc59b6ee4453e8 /etc
parent00c946d24c7f3f1cd9d5f6ef4798b72a2f7c3c16 (diff)
parent839f239f01ce3ecb4fe91a3f542d194591bc1650 (diff)
Merge branch 'sail2' into mappings
Diffstat (limited to 'etc')
-rw-r--r--etc/loc.mk13
1 files changed, 13 insertions, 0 deletions
diff --git a/etc/loc.mk b/etc/loc.mk
new file mode 100644
index 00000000..bf79a723
--- /dev/null
+++ b/etc/loc.mk
@@ -0,0 +1,13 @@
+TEMPDIR:=sloc_tmp
+loc: $(LOC_FILES)
+ @rm -rf $(TEMPDIR)
+ @mkdir -p $(TEMPDIR)
+ @cp $^ $(TEMPDIR)
+ @for f in $(TEMPDIR)/*.sail; do mv "$$f" "$${f%.sail}.c"; done
+ @sloccount --details $(TEMPDIR) | grep ansic
+ @sloccount $(TEMPDIR) | grep ansic
+ rm -rf $(TEMPDIR)
+
+cloc: $(LOC_FILES)
+ cloc --by-file --force-lang C,sail $^
+