diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-16 12:14:24 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-16 12:14:24 +0000 |
commit | 95b064087699d50ffb14a1d9c18095987723ab36 (patch) | |
tree | 658d3cac1774bf26ad6934d3f285365dc4c8d8e0 /tool | |
parent | 9790f364fa1d3c4d759cf3c6575fb86287429712 (diff) |
merges r21606 from trunk into ruby_1_9_1.
* tool/make-snapshot (package): includes all rules and expand
configured values from the environment to create *.inc, sets RM
for ripper.c, and needs chdir if absolute path is given with
-exported option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/make-snapshot | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot index 1f6624278d..13e437b20e 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -19,7 +19,9 @@ YACC = ENV["YACC"] ||= "bison" ENV["BASERUBY"] ||= "ruby" ENV["RUBY"] ||= "ruby" ENV["MV"] ||= "mv" +ENV["RM"] ||= "rm -f" ENV["MINIRUBY"] ||= "ruby" +ENV["PROGRAM"] ||= "ruby" class String # for older ruby @@ -157,8 +159,8 @@ def package(rev, destdir) FileUtils.mkpath(hdrdir = "#{extout}/include/ruby") File.open("#{hdrdir}/config.h", "w") {} miniruby = ENV['MINIRUBY'] + " -rcross" - IO.popen("make -f - prereq srcdir=. IFCHANGE=tool/ifchange 'MINIRUBY=#{miniruby}'", "w") do |f| - f.puts(IO.read("Makefile.in")[/^lex\.c.*?^$/m]) + IO.popen("make -f - prereq srcdir=. IFCHANGE=tool/ifchange 'MINIRUBY=#{miniruby}' 'RUBY=#{ENV["RUBY"]}'", "w") do |f| + f.puts(IO.read("Makefile.in").gsub(/^@.*\n/, '').gsub(/@([A-Za-z_]\w*)@/) {ENV[$1]}) f.puts(commonmk.gsub(/\{[^{}]*\}/, "")) end File.open("enc.mk", "r+b") do |f| @@ -185,6 +187,9 @@ def package(rev, destdir) if v == "." v = File.basename(Dir.pwd) Dir.chdir ".." + else + Dir.chdir(File.dirname(v)) + v = File.basename(v) end return [["bzip tarball", ".tar.bz2", %w"tar cjf"], |