about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-06-27 01:44:39 +0000
committerEric Wong <normalperson@yhbt.net>2011-06-27 01:44:39 +0000
commitda7ee89b75b5c0cdd2f332d073104f10ea14e055 (patch)
treee7aea01b3bbcbdc737bddfdd4573ce34209a34ca
parent1e7dc89cc38c5dec0b63ac452b23141297701f88 (diff)
downloadraindrops-da7ee89b75b5c0cdd2f332d073104f10ea14e055.tar.gz
* check-warnings option added
* locale-independent grep invocation
-rw-r--r--pkg.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg.mk b/pkg.mk
index 487733a..4cd5bef 100644
--- a/pkg.mk
+++ b/pkg.mk
@@ -69,7 +69,7 @@ doc:: .document .wrongdoc.yml $(pkg_extra)
         $(RM) -r doc
         $(WRONGDOC) all
         install -m644 COPYING doc/COPYING
-        install -m644 $(shell grep '^[A-Z]' .document) doc/
+        install -m644 $(shell LC_ALL=C grep '^[A-Z]' .document) doc/
 
 ifneq ($(VERSION),)
 pkggem := pkg/$(rfpackage)-$(VERSION).gem
@@ -167,5 +167,9 @@ doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
 doc_gz:
         for i in $(docs); do \
           gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done
+check-warnings:
+        @(for i in $$(git ls-files '*.rb'| grep -v '^setup\.rb$$'); \
+          do $(RUBY) -d -W2 -c $$i; done) | grep -v '^Syntax OK$$' || :
 
 .PHONY: all .FORCE-GIT-VERSION-FILE doc test $(test_units) manifest
+.PHONY: check-warnings