mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* tool/make-snapshot: fix for clean up.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7fe95731a8
commit
eaa1bcab35
4 changed files with 19 additions and 10 deletions
|
@ -1,3 +1,7 @@
|
|||
Wed Aug 13 13:09:09 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* tool/make-snapshot: fix for clean up.
|
||||
|
||||
Wed Aug 13 11:45:51 2008 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* vm_core.h: Declare rb_iseq_clone, which is used in class.c.
|
||||
|
|
|
@ -181,9 +181,12 @@ $(srcdir)/configure: $(srcdir)/configure.in
|
|||
# * svn checkout generate a file with mtime as current time
|
||||
# * XFS has a mtime with fractional part
|
||||
lex.c: keywords
|
||||
@\
|
||||
if cmp -s $(srcdir)/lex.c.src $?; then \
|
||||
set -x; \
|
||||
cp $(srcdir)/lex.c.blt $@; \
|
||||
else \
|
||||
set -x; \
|
||||
gperf -C -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $? > $@.tmp && \
|
||||
mv $@.tmp $@ && \
|
||||
cp $? $(srcdir)/lex.c.src && \
|
||||
|
|
|
@ -646,7 +646,7 @@ INSNS = opt_sc.inc optinsn.inc optunifs.inc insns.inc insns_info.inc \
|
|||
INSNS2VMOPT = --srcdir="$(srcdir)"
|
||||
|
||||
$(INSNS): $(srcdir)/insns.def {$(VPATH)}vm_opts.h
|
||||
$(RM) $(PROGRAM)
|
||||
@$(RM) $(PROGRAM)
|
||||
$(BASERUBY) -Ks $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) $@
|
||||
|
||||
minsns.inc: $(srcdir)/template/minsns.inc.tmpl
|
||||
|
|
|
@ -84,7 +84,7 @@ def package(rev, destdir)
|
|||
end
|
||||
end
|
||||
|
||||
if !File.directory(v = "ruby")
|
||||
if !File.directory?(v = "ruby")
|
||||
v = Dir.glob("ruby-*").select(&File.method(:directory?))
|
||||
v.size == 1 or abort "not exported"
|
||||
v = v[0]
|
||||
|
@ -102,8 +102,9 @@ def package(rev, destdir)
|
|||
v = "ruby-#{version}-#{tag}"
|
||||
File.directory?(v) or File.rename "ruby", v
|
||||
system("patch -d #{v} -p0 -i #{$patch_file}") if $patch_file
|
||||
def (clean = []).add(n) push(n); n end
|
||||
Dir.chdir(v) do
|
||||
File.open("cross.rb", "w") {|f| f.puts "CROSS_COMPILING=true"}
|
||||
File.open(clean.add("cross.rb"), "w") {|f| f.puts "CROSS_COMPILING=true"}
|
||||
unless File.exist?("configure")
|
||||
print "creating configure..."
|
||||
unless system("autoconf")
|
||||
|
@ -112,13 +113,14 @@ def package(rev, destdir)
|
|||
end
|
||||
puts " done"
|
||||
end
|
||||
FileUtils.rm_rf("autom4te.cache")
|
||||
clean.add("autom4te.cache")
|
||||
print "creating prerequisites..."
|
||||
if File.file?("common.mk") && /^prereq/ =~ commonmk = IO.read("common.mk")
|
||||
puts
|
||||
File.open("config.status", "w") {|f|
|
||||
extout = clean.add('tmp')
|
||||
File.open(clean.add("config.status"), "w") {|f|
|
||||
f.puts "s,@configure_args@,|#_!!_#|,g"
|
||||
f.puts "s,@EXTOUT@,|#_!!_#|..,g"
|
||||
f.puts "s,@EXTOUT@,|#_!!_#|#{extout},g"
|
||||
f.puts "s,@bindir@,|#_!!_#|,g"
|
||||
f.puts "s,@ruby_install_name@,|#_!!_#|,g"
|
||||
f.puts "s,@ARCH_FLAG@,|#_!!_#|,g"
|
||||
|
@ -131,19 +133,19 @@ def package(rev, destdir)
|
|||
f.puts "s,@LIBRUBY@,|#_!!_#|liburyb.a,g"
|
||||
f.puts "s,@LIBRUBY_A@,|#_!!_#|liburyb.a,g"
|
||||
}
|
||||
FileUtils.mkpath("../include/ruby")
|
||||
File.open("../include/ruby/config.h", "w") {}
|
||||
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])
|
||||
f.puts(commonmk.gsub(/\{[^{}]*\}/, ""))
|
||||
end
|
||||
FileUtils.rm_rf("config.status", "../include")
|
||||
clean.push("rbconfig.rb", ".rbconfig.time")
|
||||
print "prerequisites"
|
||||
else
|
||||
system("#{YACC} -o parse.c parse.y")
|
||||
end
|
||||
File.unlink("cross.rb")
|
||||
FileUtils.rm_rf(clean)
|
||||
unless $?.success?
|
||||
puts " failed"
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue