for p in $(REQUIRES); do echo "#require \"$$p\";;" >> .ocamlinit; done
echo "#load \"$(PACKAGE).cma\";;" >> .ocamlinit
+# $(STATS_EXCLUDE) may be defined in libraries' Makefile to exclude some file
+# from statistics collection
+STATS_FILES = \
+ $(shell find . -maxdepth 1 -type f -name \*.ml $(foreach f,$(STATS_EXCLUDE),-not -name $(f))) \
+ $(shell find . -maxdepth 1 -type f -name \*.mli $(foreach f,$(STATS_EXCLUDE),-not -name $(f)))
+.stats: $(STATS_FILES)
+ rm -f .stats
+ echo -n "LOC:" >> .stats
+ wc -l $(STATS_FILES) | tail -1 | awk '{ print $$1 }' >> .stats
+
.PHONY: all opt world backup depend install uninstall clean ocamlinit
ifneq ($(MAKECMDGOALS), depend)