зеркало из https://github.com/github/ruby.git
Renamed `load_*.inc` as `*.rbinc` to utilize a suffix rule
This commit is contained in:
Родитель
6e72b72881
Коммит
20971799f2
2
ast.c
2
ast.c
|
@ -681,7 +681,7 @@ ast_node_inspect(rb_execution_context_t *ec, VALUE self)
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "load_ast.inc"
|
#include "ast.rbinc"
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_ast(void)
|
Init_ast(void)
|
||||||
|
|
30
common.mk
30
common.mk
|
@ -4,7 +4,7 @@ bin: $(PROGRAM) $(WPROGRAM)
|
||||||
lib: $(LIBRUBY)
|
lib: $(LIBRUBY)
|
||||||
dll: $(LIBRUBY_SO)
|
dll: $(LIBRUBY_SO)
|
||||||
|
|
||||||
.SUFFIXES: .inc .h .c .y .i .$(ASMEXT) .$(DTRACE_EXT)
|
.SUFFIXES: .rbinc .rb .inc .h .c .y .i .$(ASMEXT) .$(DTRACE_EXT)
|
||||||
|
|
||||||
# V=0 quiet, V=1 verbose. other values don't work.
|
# V=0 quiet, V=1 verbose. other values don't work.
|
||||||
V = 0
|
V = 0
|
||||||
|
@ -614,7 +614,7 @@ clean-rubyspec: clean-spec
|
||||||
|
|
||||||
distclean: distclean-ext distclean-enc distclean-golf distclean-docs distclean-extout distclean-local distclean-platform distclean-spec
|
distclean: distclean-ext distclean-enc distclean-golf distclean-docs distclean-extout distclean-local distclean-platform distclean-spec
|
||||||
distclean-local:: clean-local
|
distclean-local:: clean-local
|
||||||
$(Q)$(RM) $(MKFILES) yasmdata.rb *.inc $(PRELUDES)
|
$(Q)$(RM) $(MKFILES) yasmdata.rb *.inc $(PRELUDES) *.rbinc
|
||||||
$(Q)$(RM) config.cache config.status config.status.lineno
|
$(Q)$(RM) config.cache config.status config.status.lineno
|
||||||
$(Q)$(RM) *~ *.bak *.stackdump core *.core gmon.out $(PREP)
|
$(Q)$(RM) *~ *.bak *.stackdump core *.core gmon.out $(PREP)
|
||||||
-$(Q)$(RMALL) $(srcdir)/autom4te.cache
|
-$(Q)$(RMALL) $(srcdir)/autom4te.cache
|
||||||
|
@ -1094,22 +1094,16 @@ preludes: {$(VPATH)}prelude.c
|
||||||
preludes: {$(VPATH)}miniprelude.c
|
preludes: {$(VPATH)}miniprelude.c
|
||||||
preludes: {$(srcdir)}golf_prelude.c
|
preludes: {$(srcdir)}golf_prelude.c
|
||||||
|
|
||||||
BUILTIN_RB_SRCS = $(srcdir)/trace_point.rb $(srcdir)/ast.rb $(srcdir)/io.rb
|
BUILTIN_RB_SRCS = {$(VPATH)}trace_point.rb {$(VPATH)}ast.rb {$(VPATH)}io.rb
|
||||||
|
BUILTIN_RB_INCS = $(BUILTIN_RB_SRCS:.rb=.rbinc)
|
||||||
|
|
||||||
|
.rb.rbinc:
|
||||||
|
$(Q) $(BASERUBY) $(srcdir)/tool/mk_builtin_loader.rb $<
|
||||||
|
|
||||||
builtin_binary.inc: $(PREP) $(BUILTIN_RB_SRCS) $(srcdir)/tool/mk_builtin_binary.rb
|
builtin_binary.inc: $(PREP) $(BUILTIN_RB_SRCS) $(srcdir)/tool/mk_builtin_binary.rb
|
||||||
$(Q) $(MINIRUBY) $(srcdir)/tool/mk_builtin_binary.rb
|
$(Q) $(MINIRUBY) $(srcdir)/tool/mk_builtin_binary.rb
|
||||||
|
|
||||||
load_trace_point.inc: $(srcdir)/trace_point.rb $(srcdir)/tool/mk_builtin_loader.rb
|
$(BUILTIN_RB_INCS): $(top_srcdir)/tool/mk_builtin_loader.rb
|
||||||
$(Q) $(BASERUBY) $(srcdir)/tool/mk_builtin_loader.rb $(srcdir)/trace_point.rb
|
|
||||||
|
|
||||||
load_ast.inc: $(srcdir)/ast.rb $(srcdir)/tool/mk_builtin_loader.rb
|
|
||||||
$(Q) $(BASERUBY) $(srcdir)/tool/mk_builtin_loader.rb $(srcdir)/ast.rb
|
|
||||||
|
|
||||||
load_io.inc: $(srcdir)/io.rb $(srcdir)/tool/mk_builtin_loader.rb
|
|
||||||
$(Q) $(BASERUBY) $(srcdir)/tool/mk_builtin_loader.rb $(srcdir)/io.rb
|
|
||||||
|
|
||||||
load_gc.inc: $(srcdir)/gc.rb $(srcdir)/tool/mk_builtin_loader.rb
|
|
||||||
$(Q) $(BASERUBY) $(srcdir)/tool/mk_builtin_loader.rb $(srcdir)/gc.rb
|
|
||||||
|
|
||||||
$(srcdir)/revision.h:
|
$(srcdir)/revision.h:
|
||||||
$(Q)$(gnumake:yes=#) $(RM) $(@F)
|
$(Q)$(gnumake:yes=#) $(RM) $(@F)
|
||||||
|
@ -1598,7 +1592,7 @@ ast.$(OBJEXT): {$(VPATH)}id.h
|
||||||
ast.$(OBJEXT): {$(VPATH)}intern.h
|
ast.$(OBJEXT): {$(VPATH)}intern.h
|
||||||
ast.$(OBJEXT): {$(VPATH)}internal.h
|
ast.$(OBJEXT): {$(VPATH)}internal.h
|
||||||
ast.$(OBJEXT): {$(VPATH)}iseq.h
|
ast.$(OBJEXT): {$(VPATH)}iseq.h
|
||||||
ast.$(OBJEXT): {$(VPATH)}load_ast.inc
|
ast.$(OBJEXT): {$(VPATH)}ast.rbinc
|
||||||
ast.$(OBJEXT): {$(VPATH)}method.h
|
ast.$(OBJEXT): {$(VPATH)}method.h
|
||||||
ast.$(OBJEXT): {$(VPATH)}missing.h
|
ast.$(OBJEXT): {$(VPATH)}missing.h
|
||||||
ast.$(OBJEXT): {$(VPATH)}node.h
|
ast.$(OBJEXT): {$(VPATH)}node.h
|
||||||
|
@ -2108,7 +2102,7 @@ gc.$(OBJEXT): {$(VPATH)}id_table.h
|
||||||
gc.$(OBJEXT): {$(VPATH)}intern.h
|
gc.$(OBJEXT): {$(VPATH)}intern.h
|
||||||
gc.$(OBJEXT): {$(VPATH)}internal.h
|
gc.$(OBJEXT): {$(VPATH)}internal.h
|
||||||
gc.$(OBJEXT): {$(VPATH)}io.h
|
gc.$(OBJEXT): {$(VPATH)}io.h
|
||||||
gc.$(OBJEXT): {$(VPATH)}load_gc.inc
|
gc.$(OBJEXT): {$(VPATH)}gc.rbinc
|
||||||
gc.$(OBJEXT): {$(VPATH)}method.h
|
gc.$(OBJEXT): {$(VPATH)}method.h
|
||||||
gc.$(OBJEXT): {$(VPATH)}missing.h
|
gc.$(OBJEXT): {$(VPATH)}missing.h
|
||||||
gc.$(OBJEXT): {$(VPATH)}mjit.h
|
gc.$(OBJEXT): {$(VPATH)}mjit.h
|
||||||
|
@ -2236,7 +2230,7 @@ io.$(OBJEXT): {$(VPATH)}intern.h
|
||||||
io.$(OBJEXT): {$(VPATH)}internal.h
|
io.$(OBJEXT): {$(VPATH)}internal.h
|
||||||
io.$(OBJEXT): {$(VPATH)}io.c
|
io.$(OBJEXT): {$(VPATH)}io.c
|
||||||
io.$(OBJEXT): {$(VPATH)}io.h
|
io.$(OBJEXT): {$(VPATH)}io.h
|
||||||
io.$(OBJEXT): {$(VPATH)}load_io.inc
|
io.$(OBJEXT): {$(VPATH)}io.rbinc
|
||||||
io.$(OBJEXT): {$(VPATH)}method.h
|
io.$(OBJEXT): {$(VPATH)}method.h
|
||||||
io.$(OBJEXT): {$(VPATH)}missing.h
|
io.$(OBJEXT): {$(VPATH)}missing.h
|
||||||
io.$(OBJEXT): {$(VPATH)}node.h
|
io.$(OBJEXT): {$(VPATH)}node.h
|
||||||
|
@ -3419,7 +3413,7 @@ vm_trace.$(OBJEXT): {$(VPATH)}intern.h
|
||||||
vm_trace.$(OBJEXT): {$(VPATH)}internal.h
|
vm_trace.$(OBJEXT): {$(VPATH)}internal.h
|
||||||
vm_trace.$(OBJEXT): {$(VPATH)}io.h
|
vm_trace.$(OBJEXT): {$(VPATH)}io.h
|
||||||
vm_trace.$(OBJEXT): {$(VPATH)}iseq.h
|
vm_trace.$(OBJEXT): {$(VPATH)}iseq.h
|
||||||
vm_trace.$(OBJEXT): {$(VPATH)}load_trace_point.inc
|
vm_trace.$(OBJEXT): {$(VPATH)}trace_point.rbinc
|
||||||
vm_trace.$(OBJEXT): {$(VPATH)}method.h
|
vm_trace.$(OBJEXT): {$(VPATH)}method.h
|
||||||
vm_trace.$(OBJEXT): {$(VPATH)}missing.h
|
vm_trace.$(OBJEXT): {$(VPATH)}missing.h
|
||||||
vm_trace.$(OBJEXT): {$(VPATH)}mjit.h
|
vm_trace.$(OBJEXT): {$(VPATH)}mjit.h
|
||||||
|
|
2
gc.c
2
gc.c
|
@ -11801,7 +11801,7 @@ rb_gcdebug_remove_stress_to_class(int argc, VALUE *argv, VALUE self)
|
||||||
* See also GC.count, GC.malloc_allocated_size and GC.malloc_allocations
|
* See also GC.count, GC.malloc_allocated_size and GC.malloc_allocations
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "load_gc.inc"
|
#include "gc.rbinc"
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_GC(void)
|
Init_GC(void)
|
||||||
|
|
2
io.c
2
io.c
|
@ -13523,7 +13523,7 @@ Init_IO(void)
|
||||||
sym_wait_writable = ID2SYM(rb_intern("wait_writable"));
|
sym_wait_writable = ID2SYM(rb_intern("wait_writable"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "load_io.inc"
|
#include "io.rbinc"
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_IO_nonblock(void)
|
Init_IO_nonblock(void)
|
||||||
|
|
|
@ -26,12 +26,12 @@ def collect_builtin iseq_ary, bs
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
# ruby mk_builtin_loader.rb TARGET_FILE.rb
|
# ruby mk_builtin_loader.rb TARGET_FILE.rb
|
||||||
# #=> generate load_TARGET_FILE.inc
|
# #=> generate TARGET_FILE.rbinc
|
||||||
#
|
#
|
||||||
|
|
||||||
def mk_builtin_header file
|
def mk_builtin_header file
|
||||||
base = File.basename(file, '.rb')
|
base = File.basename(file, '.rb')
|
||||||
ofile = File.join("load_#{base}.inc")
|
ofile = "#{base}.rbinc"
|
||||||
|
|
||||||
collect_builtin(RubyVM::InstructionSequence.compile_file(file, false).to_a, bs = {})
|
collect_builtin(RubyVM::InstructionSequence.compile_file(file, false).to_a, bs = {})
|
||||||
|
|
||||||
|
|
|
@ -1511,7 +1511,7 @@ tracepoint_stat_s(rb_execution_context_t *ec, VALUE self)
|
||||||
return stat;
|
return stat;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "load_trace_point.inc"
|
#include "trace_point.rbinc"
|
||||||
|
|
||||||
/* This function is called from inits.c */
|
/* This function is called from inits.c */
|
||||||
void
|
void
|
||||||
|
|
Загрузка…
Ссылка в новой задаче