Add target that print statistics about word count.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 12 Jan 2012 00:13:12 +0200
changeset 94 1b2cf5b2b46c
parent 93 15f00e7ca27b
child 95 27117b30660d
Add target that print statistics about word count.
Makefile
--- a/Makefile	Tue Jan 10 22:37:00 2012 +0200
+++ b/Makefile	Thu Jan 12 00:13:12 2012 +0200
@@ -114,6 +114,19 @@
 	$(RST2HTML) --stylesheet=rst.css $*.rst $@
 
 ################################################################
+# Statistics targets.
+
+.PHONY: stat
+stat:
+	total=0; \
+	for dic in *.dict-c5; do \
+		cnt=`grep '^_____' $$dic | wc -l`; \
+		echo $$dic 'has  ' $$cnt words.; \
+		total=$$(($$total + $$cnt)); \
+	done; \
+	echo Total words count is $$total.
+
+################################################################
 # Clean targets.
 
 .PHONY: distclean