From e38fd64fcdf5e0f3db55eb507f758c8a6fc1f297 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Tue, 27 Feb 2007 15:12:18 +0000 Subject: [PATCH] * mkconfig.rb (RbConfig): add CONFIG['PATCHLEVEL'] * common.mk: new target dist * distruby.rb: new file git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ common.mk | 4 +++- distruby.rb | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ mkconfig.rb | 1 + version.h | 6 +++--- 5 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 distruby.rb diff --git a/ChangeLog b/ChangeLog index 779075cf8c..2912246393 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Feb 28 00:08:11 2007 URABE Shyouhei + + * mkconfig.rb (RbConfig): add CONFIG['PATCHLEVEL'] + + * common.mk: new target dist + + * distruby.rb: new file + Tue Feb 27 22:18:45 2007 WATANABE Hirofumi * configure.in (--enable-auto-image-base): avoid the neccessity to diff --git a/common.mk b/common.mk index fbb4cc5ace..1caa924fc7 100644 --- a/common.mk +++ b/common.mk @@ -324,7 +324,7 @@ $(RBCONFIG): $(srcdir)/mkconfig.rb config.status $(PREP) .PRECIOUS: $(MKFILES) -.PHONY: test install install-nodoc install-doc +.PHONY: test install install-nodoc install-doc dist PHONY: @@ -632,3 +632,5 @@ vtune: miniruby$(EXEEXT) vtl view -hf -mn miniruby$(EXEEXT) -sum -sort -cd vtl view -ha -mn miniruby$(EXEEXT) -sum -sort -cd | $(RUNRUBY) $(srcdir)/tool/vtlh.rb > ha.lines +dist: $(PROGRAM) + $(RUNRUBY) $(srcdir)/distruby.rb diff --git a/distruby.rb b/distruby.rb new file mode 100644 index 0000000000..dcc3e76ce8 --- /dev/null +++ b/distruby.rb @@ -0,0 +1,49 @@ +#!./miniruby + +if RUBY_PATCHLEVEL.zero? + dirname = sprintf 'ruby-%s', RUBY_VERSION + tagname = dirname.gsub /ruby-(\d)\.(\d)\.(\d)/, 'v\1_\2_\3' +else + dirname = sprintf 'ruby-%s-p%u', RUBY_VERSION, RUBY_PATCHLEVEL + tagname = dirname.gsub /ruby-(\d)\.(\d)\.(\d)-p/, 'v\1_\2_\3_' +end +tarname = dirname + '.tar.gz' +repos = 'http://svn.ruby-lang.org/repos/ruby/tags/' + tagname + +STDERR.puts 'exporting sources...' +system 'svn', 'export', '-q', repos, dirname +Dir.chdir dirname do + STDERR.puts 'generating configure...' + system 'autoconf' + system 'rm', '-rf', 'autom4te.cache' + + STDERR.puts 'generating parse.c...' + system 'bison', '-y', '-o', 'parse.c', 'parse.y' +end + +STDERR.puts 'generating tarball...' +system 'tar', 'chofzp', tarname, dirname + +open tarname, 'rb' do |fp| + require 'digest/md5' + require 'digest/sha1' + str = fp.read + md5 = Digest::MD5.hexdigest str + sha = Digest::SHA1.hexdigest str + printf "MD5(%s)= %s\nSHA1(%s)= %s\n", tarname, md5, tarname, sha +end + + + +# +# Local Variables: +# mode: ruby +# code: utf-8 +# indent-tabs-mode: t +# tab-width: 3 +# ruby-indent-level: 3 +# fill-column: 79 +# default-justification: full +# End: +# vi: ts=3 sw=3 + diff --git a/mkconfig.rb b/mkconfig.rb index 2d79c5fff1..3ae1f2812f 100755 --- a/mkconfig.rb +++ b/mkconfig.rb @@ -112,6 +112,7 @@ unless has_version print " CONFIG[\"MINOR\"] = \"" + $2 + "\"\n" print " CONFIG[\"TEENY\"] = \"" + $3 + "\"\n" } + print " CONFIG[\"PATCHLEVEL\"] = \"" + RUBY_PATCHLEVEL + "\"\n" end dest = drive ? /= \"(?!\$[\(\{])(?:[a-z]:)?/i : /= \"(?!\$[\(\{])/ diff --git a/version.h b/version.h index 8d06d16af7..f66b7486fb 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.9.0" -#define RUBY_RELEASE_DATE "2007-02-27" +#define RUBY_RELEASE_DATE "2007-02-28" #define RUBY_VERSION_CODE 190 -#define RUBY_RELEASE_CODE 20070227 +#define RUBY_RELEASE_CODE 20070228 #define RUBY_PATCHLEVEL 0 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_YEAR 2007 #define RUBY_RELEASE_MONTH 2 -#define RUBY_RELEASE_DAY 27 +#define RUBY_RELEASE_DAY 28 RUBY_EXTERN const char ruby_version[]; RUBY_EXTERN const char ruby_release_date[];