diff --git a/ChangeLog b/ChangeLog index 5d4ee01819..d5df0a6c74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Aug 13 10:45:29 2008 Nobuyoshi Nakada + + * tool/make-snapshot: try to find exported directory. + Wed Aug 13 10:16:35 2008 TAKAO Kouji * doc/NEWS: Mention the Readline.vi_editing_mode?, diff --git a/tool/make-snapshot b/tool/make-snapshot index 05c4dc2c75..e0f80c3bad 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -84,9 +84,11 @@ def package(rev, destdir) end end - v = "ruby-#{version}-#{tag}" - File.directory?(v) or File.rename "ruby", v - system("patch -d #{v} -p0 -i #{$patch_file}") if $patch_file + if !File.directory(v = "ruby") + v = Dir.glob("ruby-*").select(&File.method(:directory?)) + v.size == 1 or abort "not exported" + v = v[0] + end open("#{v}/revision.h", "wb") {|f| f.puts "#define RUBY_REVISION #{revision}"} version ||= (versionhdr = IO.read("#{v}/version.h"))[RUBY_VERSION_PATTERN, 1] version or return @@ -97,6 +99,9 @@ def package(rev, destdir) else tag = "r#{revision}" end + v = "ruby-#{version}-#{tag}" + File.directory?(v) or File.rename "ruby", v + system("patch -d #{v} -p0 -i #{$patch_file}") if $patch_file Dir.chdir(v) do File.open("cross.rb", "w") {|f| f.puts "CROSS_COMPILING=true"} unless File.exist?("configure")