1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Revert "Preserve the directory structure under tool/ruby_vm/views"

This reverts commit 62ec621f8c.

will revisit this once fixing non-MJIT targets
This commit is contained in:
Takashi Kokubun 2022-09-18 14:21:23 +09:00
parent 62ec621f8c
commit 12023c833f
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD
3 changed files with 2 additions and 3 deletions

View file

@ -505,7 +505,7 @@ clean-local::
-$(Q) $(RMDIRS) $(MJIT_HEADER_INSTALL_DIR) $(MJIT_HEADER_BUILD_DIR) $(TIMESTAMPDIR) 2> $(NULL) || $(NULLCMD)
main: $(srcdir)/lib/mjit/instruction.rb
$(srcdir)/lib/mjit/instruction.rb: $(tooldir)/ruby_vm/views/lib/mjit/instruction.rb.erb $(srcdir)/insns.def
$(srcdir)/lib/mjit/instruction.rb: $(tooldir)/ruby_vm/views/instruction.rb.erb $(srcdir)/insns.def
$(ECHO) generating $@
$(Q) $(BASERUBY) -Ku $(tooldir)/insns2vm.rb $(INSNS2VMOPT) $@

View file

@ -25,11 +25,10 @@ class RubyVM::Dumper
end
def new_erb spec
srcdir = Pathname.new(__dir__).parent.parent.parent
path = Pathname.new(__FILE__)
path = (path.relative_path_from(Pathname.pwd) rescue path).dirname
path += '../views'
path += Pathname.pwd.join(spec).to_s.sub("#{srcdir}/", '')
path += File.basename(spec)
src = path.read mode: 'rt:utf-8:utf-8'
rescue Errno::ENOENT
raise "don't know how to generate #{path}"