pkg.mk in wrongdoc-1.5.0 vs pkg.mk in wrongdoc-1.6.0

- old
+ new

@@ -5,11 +5,11 @@ GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE @./GIT-VERSION-GEN -include GIT-VERSION-FILE -include local.mk -DLEXT := $(shell $(RUBY) -rrbconfig -e 'puts Config::CONFIG["DLEXT"]') +DLEXT := $(shell $(RUBY) -rrbconfig -e 'puts RbConfig::CONFIG["DLEXT"]') RUBY_VERSION := $(shell $(RUBY) -e 'puts RUBY_VERSION') RUBY_ENGINE := $(shell $(RUBY) -e 'puts((RUBY_ENGINE rescue "ruby"))') lib := lib ifeq ($(shell test -f script/isolate_for_tests && echo t),t) @@ -42,33 +42,36 @@ $(ext_dl): $(ext_src) $(ext_pfx_src) $(ext_pfx)/$(ext)/Makefile @echo $^ == $@ $(MAKE) -C $(@D) lib := $(lib):$(ext_pfx)/$(ext) build: $(ext_dl) +else +build: endif -pkg_extra := GIT-VERSION-FILE NEWS ChangeLog LATEST +pkg_extra += GIT-VERSION-FILE NEWS ChangeLog LATEST ChangeLog: GIT-VERSION-FILE .wrongdoc.yml $(WRONGDOC) prepare +NEWS LATEST: ChangeLog manifest: $(RM) .manifest $(MAKE) .manifest -.manifest: ChangeLog +.manifest: $(pkg_extra) (git ls-files && for i in $@ $(pkg_extra); do echo $$i; done) | \ LC_ALL=C sort > $@+ cmp $@+ $@ || mv $@+ $@ $(RM) $@+ -doc:: .document .wrongdoc.yml - find lib -type f -name '*.rbc' -exec rm -f '{}' ';' +doc:: .document .wrongdoc.yml $(pkg_extra) + -find lib -type f -name '*.rbc' -exec rm -f '{}' ';' -find ext -type f -name '*.rbc' -exec rm -f '{}' ';' $(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 pkgtgz := pkg/$(rfpackage)-$(VERSION).tgz release_notes := release_notes-$(VERSION) @@ -142,11 +145,11 @@ all:: test test_units := $(wildcard test/test_*.rb) test: test-unit test-unit: $(test_units) $(test_units): build - $(RUBY) -I $(lib) $@ + $(RUBY) -I $(lib) $@ $(RUBY_TEST_OPTS) # this requires GNU coreutils variants ifneq ($(RSYNC_DEST),) publish_doc: -git set-file-times @@ -162,7 +165,11 @@ # "gzip_static on" can serve the gzipped versions directly. 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