about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-02-08 13:56:39 -0800
committerEric Wong <normalperson@yhbt.net>2011-02-08 13:57:37 -0800
commit257b090af54e6a1cecd44325f8664c4c682a6740 (patch)
tree6bba51e07cfcfe7582060ca62a13282b341ca63d
parentd8616b605ad4d83b69e2679e1c210e476cc18e00 (diff)
downloadkgio-257b090af54e6a1cecd44325f8664c4c682a6740.tar.gz
* Fixes Ruby 1.9.3dev deprecation warnings
* Fixes some documentation dependency issues
* Allows RUBY_TEST_OPTS to be passed to unit tests
-rw-r--r--pkg.mk15
1 files changed, 9 insertions, 6 deletions
diff --git a/pkg.mk b/pkg.mk
index fb71491..487733a 100644
--- a/pkg.mk
+++ b/pkg.mk
@@ -7,7 +7,7 @@ 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
@@ -44,24 +44,27 @@ $(ext_dl): $(ext_src) $(ext_pfx_src) $(ext_pfx)/$(ext)/Makefile
         $(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
@@ -144,7 +147,7 @@ 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),)