From 257b090af54e6a1cecd44325f8664c4c682a6740 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 8 Feb 2011 13:56:39 -0800 Subject: pkg.mk: update to the latest * Fixes Ruby 1.9.3dev deprecation warnings * Fixes some documentation dependency issues * Allows RUBY_TEST_OPTS to be passed to unit tests --- pkg.mk | 15 +++++++++------ 1 file 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),) -- cgit v1.2.3-24-ge0c7