mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Make sources by BASERUBY if available instead of miniruby
This commit is contained in:
parent
8f13d75a8c
commit
7c67d0fd79
5 changed files with 31 additions and 16 deletions
25
common.mk
25
common.mk
|
@ -82,7 +82,7 @@ EXTSOLIBS =
|
|||
MINIOBJS = $(ARCHMINIOBJS) miniinit.$(OBJEXT) dmyext.$(OBJEXT)
|
||||
ENC_MK = enc.mk
|
||||
MAKE_ENC = -f $(ENC_MK) V="$(V)" UNICODE_HDR_DIR="$(UNICODE_HDR_DIR)" \
|
||||
RUBY="$(MINIRUBY)" MINIRUBY="$(MINIRUBY)" $(mflags)
|
||||
RUBY="$(BOOTSTRAPRUBY)" MINIRUBY="$(BOOTSTRAPRUBY)" $(mflags)
|
||||
|
||||
COMMONOBJS = array.$(OBJEXT) \
|
||||
ast.$(OBJEXT) \
|
||||
|
@ -755,9 +755,12 @@ fake: $(CROSS_COMPILING)-fake
|
|||
yes-fake: $(arch)-fake.rb $(RBCONFIG) PHONY
|
||||
no-fake -fake: PHONY
|
||||
|
||||
# really doesn't depend on .o, just ensure newer than headers which
|
||||
# version.o depends on.
|
||||
$(arch)-fake.rb: $(srcdir)/template/fake.rb.in $(tooldir)/generic_erb.rb version.$(OBJEXT) miniruby$(EXEEXT)
|
||||
$(HAVE_BASERUBY:no=)$(arch)-fake.rb: miniruby$(EXEEXT)
|
||||
|
||||
# actually depending on other headers more.
|
||||
$(arch)-fake.rb: $(top_srcdir)/revision.h $(top_srcdir)/version.h $(srcdir)/version.c {$(VPATH)}vm_opts.h
|
||||
|
||||
$(arch)-fake.rb: $(srcdir)/template/fake.rb.in $(tooldir)/generic_erb.rb
|
||||
$(ECHO) generating $@
|
||||
$(Q) $(CPP) -DRUBY_EXPORT $(INCFLAGS) $(CPPFLAGS) "$(srcdir)/version.c" | \
|
||||
$(BOOTSTRAPRUBY) "$(tooldir)/generic_erb.rb" -o $@ "$(srcdir)/template/fake.rb.in" \
|
||||
|
@ -841,6 +844,7 @@ extconf: $(PREP)
|
|||
|
||||
rbconfig.rb: $(RBCONFIG)
|
||||
|
||||
$(HAVE_BASERUBY:no=)$(RBCONFIG): $(PREP)
|
||||
$(RBCONFIG): $(tooldir)/mkconfig.rb config.status $(srcdir)/version.h
|
||||
$(Q)$(BOOTSTRAPRUBY) -n \
|
||||
-e 'BEGIN{version=ARGV.shift;mis=ARGV.dup}' \
|
||||
|
@ -887,9 +891,10 @@ libtrans trans: {$(VPATH)}transdb.h
|
|||
ENC_HEADERS = $(srcdir)/enc/jis/props.h
|
||||
# Use MINIRUBY which loads fake.rb for cross compiling
|
||||
$(ENC_MK): $(srcdir)/enc/make_encmake.rb $(srcdir)/enc/Makefile.in $(srcdir)/enc/depend \
|
||||
$(srcdir)/enc/encinit.c.erb $(ENC_HEADERS) $(srcdir)/lib/mkmf.rb $(RBCONFIG) fake
|
||||
$(srcdir)/enc/encinit.c.erb $(ENC_HEADERS) $(srcdir)/lib/mkmf.rb $(RBCONFIG) $(HAVE_BASERUBY)-fake
|
||||
$(ECHO) generating $@
|
||||
$(Q) $(MINIRUBY) $(srcdir)/enc/make_encmake.rb --builtin-encs="$(BUILTIN_ENCOBJS)" --builtin-transes="$(BUILTIN_TRANSOBJS)" --module$(ENCSTATIC) $(ENCS) $@
|
||||
$(Q) $(BOOTSTRAPRUBY) -r./$(arch)-fake $(srcdir)/enc/make_encmake.rb \
|
||||
--builtin-encs="$(BUILTIN_ENCOBJS)" --builtin-transes="$(BUILTIN_TRANSOBJS)" --module$(ENCSTATIC) $(ENCS) $@
|
||||
|
||||
.PRECIOUS: $(MKFILES)
|
||||
|
||||
|
@ -1130,13 +1135,13 @@ node_name.inc: $(tooldir)/node_name.rb $(srcdir)/node.h
|
|||
$(ECHO) generating $@
|
||||
$(Q) $(BASERUBY) -n $(tooldir)/node_name.rb < $(srcdir)/node.h > $@
|
||||
|
||||
encdb.h: $(PREP) $(tooldir)/generic_erb.rb $(srcdir)/template/encdb.h.tmpl
|
||||
encdb.h: $(RBCONFIG) $(tooldir)/generic_erb.rb $(srcdir)/template/encdb.h.tmpl
|
||||
$(ECHO) generating $@
|
||||
$(Q) $(MINIRUBY) $(tooldir)/generic_erb.rb -c -o $@ $(srcdir)/template/encdb.h.tmpl $(srcdir)/enc enc
|
||||
$(Q) $(BOOTSTRAPRUBY) $(tooldir)/generic_erb.rb -c -o $@ $(srcdir)/template/encdb.h.tmpl $(srcdir)/enc enc
|
||||
|
||||
transdb.h: $(PREP) srcs-enc $(tooldir)/generic_erb.rb $(srcdir)/template/transdb.h.tmpl
|
||||
transdb.h: $(RBCONFIG) srcs-enc $(tooldir)/generic_erb.rb $(srcdir)/template/transdb.h.tmpl
|
||||
$(ECHO) generating $@
|
||||
$(Q) $(MINIRUBY) $(tooldir)/generic_erb.rb -c -o $@ $(srcdir)/template/transdb.h.tmpl $(srcdir)/enc/trans enc/trans
|
||||
$(Q) $(BOOTSTRAPRUBY) $(tooldir)/generic_erb.rb -c -o $@ $(srcdir)/template/transdb.h.tmpl $(srcdir)/enc/trans enc/trans
|
||||
|
||||
enc/encinit.c: $(ENC_MK) $(srcdir)/enc/encinit.c.erb
|
||||
|
||||
|
|
|
@ -3348,6 +3348,7 @@ done
|
|||
|
||||
BTESTRUBY='$(MINIRUBY)'
|
||||
BOOTSTRAPRUBY='$(BASERUBY)'
|
||||
BOOTSTRAPRUBY_COMMAND='$(BOOTSTRAPRUBY)'
|
||||
AS_IF([test x"$cross_compiling" = xyes], [
|
||||
test x"$MINIRUBY" = x && MINIRUBY="${RUBY-$BASERUBY} -I`$CHDIR .; pwd` "-r'$(arch)-fake'
|
||||
XRUBY_LIBDIR=`${RUBY-$BASERUBY} -rrbconfig -e ['puts RbConfig::CONFIG["libdir"]']`
|
||||
|
@ -3370,7 +3371,9 @@ AS_IF([test x"$cross_compiling" = xyes], [
|
|||
RUNRUBY_COMMAND='$(MINIRUBY) $(tooldir)/runruby.rb --extout=$(EXTOUT) $(RUNRUBYOPT)'
|
||||
RUNRUBY='$(RUNRUBY_COMMAND) --'
|
||||
XRUBY='$(RUNRUBY)'
|
||||
AS_CASE(["$HAVE_BASERUBY"], [no], [BOOTSTRAPRUBY='$(MINIRUBY)'])
|
||||
AS_CASE(["$HAVE_BASERUBY"],
|
||||
[yes], [BOOTSTRAPRUBY_COMMAND='$(BOOTSTRAPRUBY) -r./$(arch)-fake'],
|
||||
[BOOTSTRAPRUBY='$(MINIRUBY)'])
|
||||
TEST_RUNNABLE=yes
|
||||
CROSS_COMPILING=no
|
||||
])
|
||||
|
@ -3383,6 +3386,7 @@ AC_SUBST(RUNRUBY_COMMAND)
|
|||
AC_SUBST(RUNRUBY)
|
||||
AC_SUBST(XRUBY)
|
||||
AC_SUBST(BOOTSTRAPRUBY)
|
||||
AC_SUBST(BOOTSTRAPRUBY_COMMAND)
|
||||
AC_SUBST(EXTOUT, [${EXTOUT=.ext}])
|
||||
|
||||
FIRSTMAKEFILE=""
|
||||
|
|
|
@ -54,7 +54,7 @@ $(RUBY_EXP) $(LIBRUBY_SO): $(DLL_BASE_NAME).res.$(OBJEXT)
|
|||
|
||||
%.rc: $(RBCONFIG) $(srcdir)/revision.h $(srcdir)/win32/resource.rb
|
||||
$(ECHO) generating $@
|
||||
$(Q) $(MINIRUBY) $(srcdir)/win32/resource.rb \
|
||||
$(Q) $(BOOTSTRAPRUBY_COMMAND) $(srcdir)/win32/resource.rb \
|
||||
-ruby_name=$(RUBY_INSTALL_NAME) -rubyw_name=$(RUBYW_INSTALL_NAME) \
|
||||
-so_name=$(DLL_BASE_NAME) -output=$(*F) \
|
||||
. $(icondirs) $(srcdir)/win32
|
||||
|
@ -96,7 +96,7 @@ $(LIBRUBY_SO): $(RUBYDEF)
|
|||
|
||||
$(RUBYDEF): $(LIBRUBY_A) $(PREP) $(RBCONFIG)
|
||||
$(ECHO) generating $@
|
||||
$(Q) $(MINIRUBY) $(srcdir)/win32/mkexports.rb -output=$@ $(LIBRUBY_A)
|
||||
$(Q) $(BOOTSTRAPRUBY_COMMAND) $(srcdir)/win32/mkexports.rb -output=$@ $(LIBRUBY_A)
|
||||
|
||||
clean-local::
|
||||
@$(RM) $(RUBYDEF)
|
||||
|
|
|
@ -166,6 +166,7 @@ XRUBY_LIBDIR = @XRUBY_LIBDIR@
|
|||
XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@
|
||||
XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@
|
||||
BOOTSTRAPRUBY = @BOOTSTRAPRUBY@
|
||||
BOOTSTRAPRUBY_COMMAND = @BOOTSTRAPRUBY_COMMAND@
|
||||
|
||||
COROUTINE_H = @X_COROUTINE_H@
|
||||
COROUTINE_OBJ = $(COROUTINE_H:.h=.$(OBJEXT))
|
||||
|
@ -669,7 +670,6 @@ $(INSNS): $(srcdir)/insns.def vm_opts.h \
|
|||
$(ECHO) generating $@
|
||||
$(Q) $(BASERUBY) -Ku $(tooldir)/insns2vm.rb $(INSNS2VMOPT) $@
|
||||
|
||||
|
||||
loadpath: verconf.h
|
||||
@$(CPP) $(XCFLAGS) $(CPPFLAGS) $(srcdir)/loadpath.c | \
|
||||
sed -e '1,/^const char ruby_initial_load_paths/d;/;/,$$d' \
|
||||
|
|
|
@ -358,8 +358,10 @@ RUNRUBY = $(RUNRUBY) "$(tooldir)/runruby.rb" --extout="$(EXTOUT)" $(RUNRUBYOPT)
|
|||
!if "$(CROSS_COMPILING)" == "yes"
|
||||
XRUBY = $(MINIRUBY)
|
||||
BOOTSTRAPRUBY = $(BASERUBY)
|
||||
BOOTSTRAPRUBY_COMMAND = $(BOOTSTRAPRUBY) -r./$(arch)-fake
|
||||
!else
|
||||
BOOTSTRAPRUBY = $(MINIRUBY)
|
||||
BOOTSTRAPRUBY_COMMAND = $(BOOTSTRAPRUBY)
|
||||
XRUBY = $(RUNRUBY)
|
||||
!endif
|
||||
BTESTRUBY = $(MINIRUBY) -r./$(arch)-fake
|
||||
|
@ -1088,6 +1090,10 @@ s,@ruby_pc@,$(ruby_pc),;t t
|
|||
s,@MJIT_SUPPORT@,$(MJIT_SUPPORT),;t t
|
||||
<<KEEP
|
||||
|
||||
!if "$(HAVE_BASERUBY)" != "yes" || "$(CROSS_COMPILING)" == "yes"
|
||||
$(RBCONFIG): $(PREP)
|
||||
!endif
|
||||
|
||||
miniruby: miniruby$(EXEEXT)
|
||||
|
||||
miniruby$(EXEEXT):
|
||||
|
@ -1167,7 +1173,7 @@ $(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
|
|||
|
||||
$(RUBYDEF): $(LIBRUBY_A) $(RBCONFIG)
|
||||
$(ECHO) generating $(@:\=/)
|
||||
$(Q) $(MINIRUBY) $(srcdir)/win32/mkexports.rb \
|
||||
$(Q) $(BOOTSTRAPRUBY_COMMAND) $(srcdir)/win32/mkexports.rb \
|
||||
-output=$@ -arch=$(ARCH) $(LIBRUBY_A)
|
||||
|
||||
{$(win_srcdir)}.def.lib:
|
||||
|
@ -1212,7 +1218,7 @@ clean-enc distclean-enc realclean-enc:
|
|||
!endif
|
||||
|
||||
$(RCFILES): $(RBCONFIG) $(srcdir)/revision.h $(srcdir)/win32/resource.rb
|
||||
@$(MINIRUBY) $(srcdir)/win32/resource.rb \
|
||||
@$(BOOTSTRAPRUBY_COMMAND) $(srcdir)/win32/resource.rb \
|
||||
-ruby_name=$(RUBY_INSTALL_NAME) \
|
||||
-rubyw_name=$(RUBYW_INSTALL_NAME) \
|
||||
-so_name=$(RUBY_SO_NAME) \
|
||||
|
|
Loading…
Reference in a new issue