зеркало из https://github.com/github/ruby.git
* common.mk (INSNS): not chdir to srcdir.
* lib/vm/instruction.rb (RubyVM::SourceCodeGenerator): --destdir option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
d690c9283c
Коммит
ee8f40b5a6
|
@ -1,3 +1,10 @@
|
|||
Mon Aug 6 13:00:07 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* common.mk (INSNS): not chdir to srcdir.
|
||||
|
||||
* lib/vm/instruction.rb (RubyVM::SourceCodeGenerator): --destdir
|
||||
option.
|
||||
|
||||
Sun Aug 5 11:51:39 2007 Kouhei Sutou <kou@cozmixng.org>
|
||||
|
||||
* lib/rss, sample/rss, test/rss:
|
||||
|
|
|
@ -593,7 +593,7 @@ INSNS2VMOPT = --srcdir="$(srcdir)"
|
|||
|
||||
$(INSNS): $(srcdir)/insns.def {$(VPATH)}vm_opts.h
|
||||
$(RM) $(PROGRAM)
|
||||
$(BASERUBY) -C $(srcdir) tool/insns2vm.rb $(INSNS2VMOPT)
|
||||
$(BASERUBY) $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT)
|
||||
|
||||
minsns.inc: $(srcdir)/template/minsns.inc.tmpl
|
||||
|
||||
|
|
|
@ -97,6 +97,7 @@ module RubyVM
|
|||
@vpath = opts[:VPATH] || File
|
||||
@use_const = opts[:use_const]
|
||||
@verbose = opts[:verbose]
|
||||
@destdir = opts[:destdir]
|
||||
|
||||
(@vm_opts = load_vm_opts).each {|k, v|
|
||||
@vm_opts[k] = opts[k] if opts.key?(k)
|
||||
|
@ -110,6 +111,7 @@ module RubyVM
|
|||
end
|
||||
|
||||
attr_reader :vpath
|
||||
attr_reader :destdir
|
||||
|
||||
%w[use_const verbose].each do |attr|
|
||||
attr_reader attr
|
||||
|
@ -252,11 +254,7 @@ module RubyVM
|
|||
insn_in = true
|
||||
body = ''
|
||||
|
||||
if /\/\/(.+)/ =~ rets_str
|
||||
sp_inc = $1
|
||||
else
|
||||
sp_inc = nil
|
||||
end
|
||||
sp_inc = rets_str[%r"//\s*(.+)", 1]
|
||||
|
||||
raise unless /^\{$/ =~ f.gets.chomp
|
||||
line_no = f.line_no
|
||||
|
@ -639,6 +637,12 @@ module RubyVM
|
|||
def use_const?
|
||||
@insns.use_const?
|
||||
end
|
||||
|
||||
def output_path(fn)
|
||||
d = @insns.destdir
|
||||
fn = File.join(d, fn) if d
|
||||
fn
|
||||
end
|
||||
end
|
||||
|
||||
###################################################################
|
||||
|
@ -1269,7 +1273,7 @@ module RubyVM
|
|||
args = Files.keys if args.empty?
|
||||
args.each{|fn|
|
||||
s = Files[fn].new(@insns).generate
|
||||
open(fn, 'w') {|f| f.puts(s)}
|
||||
open(output_path(fn), 'w') {|f| f.puts(s)}
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -1310,6 +1314,10 @@ module RubyVM
|
|||
"use consts for default operands instead of macros") {|v|
|
||||
opts[:use_const] = v
|
||||
}
|
||||
opt.on("-d", "--destdir", "--output-directory=DIR",
|
||||
"make output file underneath DIR") {|v|
|
||||
opts[:destdir] = v
|
||||
}
|
||||
opt.on("-V", "--[no-]verbose") {|v|
|
||||
opts[:verbose] = v
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#define RUBY_VERSION "1.9.0"
|
||||
#define RUBY_RELEASE_DATE "2007-08-05"
|
||||
#define RUBY_RELEASE_DATE "2007-08-06"
|
||||
#define RUBY_VERSION_CODE 190
|
||||
#define RUBY_RELEASE_CODE 20070805
|
||||
#define RUBY_RELEASE_CODE 20070806
|
||||
#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 8
|
||||
#define RUBY_RELEASE_DAY 5
|
||||
#define RUBY_RELEASE_DAY 6
|
||||
|
||||
#ifdef RUBY_EXTERN
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
|
|
Загрузка…
Ссылка в новой задаче