Skip to content

Commit

Permalink
merges r21606 from trunk into ruby_1_9_1.
Browse files Browse the repository at this point in the history
* 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@21609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
yugui committed Jan 16, 2009
1 parent 9c5b2df commit 2e75399
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
@@ -1,3 +1,10 @@
Fri Jan 16 18:43:30 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>

* 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.

Thu Jan 15 14:27:27 2009 Martin Duerst <duerst@it.aoyama.ac.jp>

* LEGAL: Added information for missing/langinfo.c
Expand Down
9 changes: 7 additions & 2 deletions tool/make-snapshot
Expand Up @@ -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
Expand Down Expand Up @@ -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|
Expand All @@ -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"],
Expand Down

0 comments on commit 2e75399

Please sign in to comment.