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

* common.mk, Makefile.in: generate libminiruby-static.a

which contains prelude.o for miniruby.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2007-11-10 10:50:58 +00:00
parent 00e55418ce
commit 7315b449f3
4 changed files with 24 additions and 15 deletions

View file

@ -1,8 +1,7 @@
Sat Nov 10 19:21:24 2007 Tanaka Akira <akr@fsij.org> Sat Nov 10 19:46:54 2007 Tanaka Akira <akr@fsij.org>
* common.mk (EXPLOBJS): create new variable for ext_prelude.o. * common.mk, Makefile.in: generate libminiruby-static.a
which contains prelude.o for miniruby.
* Makefile.in(h: use EXPLOBJS.
Sat Nov 10 18:10:07 2007 Tanaka Akira <akr@fsij.org> Sat Nov 10 18:10:07 2007 Tanaka Akira <akr@fsij.org>

View file

@ -66,6 +66,7 @@ MAJOR= @MAJOR@
MINOR= @MINOR@ MINOR= @MINOR@
TEENY= @TEENY@ TEENY= @TEENY@
LIBMINIRUBY_A = @LIBMINIRUBY_A@
LIBRUBY_A = @LIBRUBY_A@ LIBRUBY_A = @LIBRUBY_A@
LIBRUBY_SO = @LIBRUBY_SO@ LIBRUBY_SO = @LIBRUBY_SO@
LIBRUBY_ALIASES= @LIBRUBY_ALIASES@ LIBRUBY_ALIASES= @LIBRUBY_ALIASES@
@ -105,7 +106,7 @@ all:
miniruby$(EXEEXT): miniruby$(EXEEXT):
@$(RM) $@ @$(RM) $@
$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(MINIOBJS) $(LIBRUBY_A) $(LIBS) $(OUTFLAG)$@ $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(MINIOBJS) $(LIBMINIRUBY_A) $(LIBS) $(OUTFLAG)$@
$(PROGRAM): $(PROGRAM):
@$(RM) $@ @$(RM) $@
@ -114,14 +115,19 @@ $(PROGRAM):
# We must `rm' the library each time this rule is invoked because "updating" a # We must `rm' the library each time this rule is invoked because "updating" a
# MAB library on Apple/NeXT (see --enable-fat-binary in configure) is not # MAB library on Apple/NeXT (see --enable-fat-binary in configure) is not
# supported. # supported.
$(LIBMINIRUBY_A):
@$(RM) $@
$(AR) $(ARFLAGS) $@ $(OBJS) prelude.$(OBJEXT) $(DMYEXT)
@-$(RANLIB) $@ 2> /dev/null || true
$(LIBRUBY_A): $(LIBRUBY_A):
@$(RM) $@ @$(RM) $@
$(AR) $(ARFLAGS) $@ $(OBJS) $(EXPLOBJS) $(DMYEXT) $(AR) $(ARFLAGS) $@ $(OBJS) ext_prelude.$(OBJEXT) $(DMYEXT)
@-$(RANLIB) $@ 2> /dev/null || true @-$(RANLIB) $@ 2> /dev/null || true
$(LIBRUBY_SO): $(LIBRUBY_SO):
@-$(PRE_LIBRUBY_UPDATE) @-$(PRE_LIBRUBY_UPDATE)
$(LDSHARED) $(DLDFLAGS) $(OBJS) $(EXPLOBJS) $(DLDOBJS) $(SOLIBS) $(OUTFLAG)$@ $(LDSHARED) $(DLDFLAGS) $(OBJS) ext_prelude.$(OBJEXT) $(DLDOBJS) $(SOLIBS) $(OUTFLAG)$@
@-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link if File.exist? link; \ @-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link if File.exist? link; \
File.symlink "$(LIBRUBY_SO)", link}' \ File.symlink "$(LIBRUBY_SO)", link}' \
$(LIBRUBY_ALIASES) || true $(LIBRUBY_ALIASES) || true

View file

@ -16,7 +16,6 @@ RDOCOUT = $(EXTOUT)/rdoc
DMYEXT = dmyext.$(OBJEXT) DMYEXT = dmyext.$(OBJEXT)
MAINOBJ = main.$(OBJEXT) MAINOBJ = main.$(OBJEXT)
EXTOBJS = EXTOBJS =
EXPLOBJS = ext_prelude.$(OBJEXT)
DLDOBJS = $(DMYEXT) DLDOBJS = $(DMYEXT)
ENCOBJS = ascii.$(OBJEXT) \ ENCOBJS = ascii.$(OBJEXT) \
@ -102,13 +101,15 @@ all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY)
@$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS) @$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS)
prog: $(PROGRAM) $(WPROGRAM) prog: $(PROGRAM) $(WPROGRAM)
miniruby$(EXEEXT): config.status $(LIBRUBY_A) $(MAINOBJ) $(MINIOBJS) $(OBJS) $(DMYEXT) miniruby$(EXEEXT): config.status $(LIBMINIRUBY_A) $(MAINOBJ) $(MINIOBJS) $(OBJS) $(DMYEXT)
$(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXPLOBJS) $(EXTOBJS) $(SETUP) $(PREP) $(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(OBJS) ext_prelude.$(OBJEXT) $(EXTOBJS) $(SETUP) $(PREP)
$(LIBRUBY_A): $(OBJS) $(EXPLOBJS) $(DMYEXT) $(ARCHFILE) $(LIBMINIRUBY_A): $(OBJS) prelude.$(OBJEXT) $(DMYEXT) $(ARCHFILE)
$(LIBRUBY_SO): $(OBJS) $(EXPLOBJS) $(DLDOBJS) $(LIBRUBY_A) $(PREP) $(LIBRUBY_SO_UPDATE) $(LIBRUBY_A): $(OBJS) ext_prelude.$(OBJEXT) $(DMYEXT) $(ARCHFILE)
$(LIBRUBY_SO): $(OBJS) ext_prelude.$(OBJEXT) $(DLDOBJS) $(LIBRUBY_A) $(PREP) $(LIBRUBY_SO_UPDATE)
$(LIBRUBY_EXTS): $(LIBRUBY_EXTS):
@exit > $@ @exit > $@
@ -117,8 +118,8 @@ $(STATIC_RUBY)$(EXEEXT): $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A)
@$(RM) $@ @$(RM) $@
$(PURIFY) $(CC) $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A) $(MAINLIBS) $(EXTLIBS) $(LIBS) $(OUTFLAG)$@ $(LDFLAGS) $(XLDFLAGS) $(PURIFY) $(CC) $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A) $(MAINLIBS) $(EXTLIBS) $(LIBS) $(OUTFLAG)$@ $(LDFLAGS) $(XLDFLAGS)
ruby.imp: $(OBJS) $(EXPLOBJS) ruby.imp: $(OBJS) prelude.$(OBJEXT)
@$(NM) -Pgp $(OBJS) $(EXPLOBJS) | awk 'BEGIN{print "#!"}; $$2~/^[BD]$$/{print $$1}' | sort -u -o $@ @$(NM) -Pgp $(OBJS) prelude.$(OBJEXT) | awk 'BEGIN{print "#!"}; $$2~/^[BD]$$/{print $$1}' | sort -u -o $@
install: install-nodoc $(RDOCTARGET) install: install-nodoc $(RDOCTARGET)
install-all: install-nodoc install-doc install-all: install-nodoc install-doc
@ -296,7 +297,7 @@ clear-installed-list:
clean: clean-ext clean-local clean: clean-ext clean-local
clean-local:: clean-local::
@$(RM) $(OBJS) $(EXPLOBJS) $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY) $(LIBRUBY_ALIASES) @$(RM) $(OBJS) prelude.$(OBJEXT) ext_prelude.$(OBJEXT) $(MAINOBJ) $(WINMAINOBJ) $(LIBMINIRUBY_A) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY) $(LIBRUBY_ALIASES)
@$(RM) $(PROGRAM) $(WPROGRAM) miniruby$(EXEEXT) dmyext.$(OBJEXT) $(ARCHFILE) .*.time @$(RM) $(PROGRAM) $(WPROGRAM) miniruby$(EXEEXT) dmyext.$(OBJEXT) $(ARCHFILE) .*.time
@$(RM) *.inc @$(RM) *.inc
clean-ext: clean-ext:

View file

@ -1287,6 +1287,7 @@ AC_SUBST(RUNRUBY)
AC_SUBST(EXTOUT, [${EXTOUT=.ext}]) AC_SUBST(EXTOUT, [${EXTOUT=.ext}])
FIRSTMAKEFILE="" FIRSTMAKEFILE=""
LIBMINIRUBY_A='libmini$(RUBY_SO_NAME)-static.a'
LIBRUBY_A='lib$(RUBY_SO_NAME)-static.a' LIBRUBY_A='lib$(RUBY_SO_NAME)-static.a'
LIBRUBY='$(LIBRUBY_A)' LIBRUBY='$(LIBRUBY_A)'
LIBRUBYARG_STATIC='-l$(RUBY_SO_NAME)-static' LIBRUBYARG_STATIC='-l$(RUBY_SO_NAME)-static'
@ -1437,6 +1438,7 @@ case "$target_os" in
;; ;;
os2-emx) os2-emx)
CFLAGS="$CFLAGS -DOS2 -Zmts" CFLAGS="$CFLAGS -DOS2 -Zmts"
LIBMINIRUBY_A=`echo $LIBMINIRUBY_A | sed 's/^lib//'`
LIBRUBY_A=`echo $LIBRUBY_A | sed 's/^lib//'` LIBRUBY_A=`echo $LIBRUBY_A | sed 's/^lib//'`
LIBRUBY_SO=`echo $LIBRUBY_SO | sed 's/^lib//'` LIBRUBY_SO=`echo $LIBRUBY_SO | sed 's/^lib//'`
LIBRUBY_ALIASES=`for i in $LIBRUBY_ALIASES; do echo "$i"; done | sed 's/^lib//'` LIBRUBY_ALIASES=`for i in $LIBRUBY_ALIASES; do echo "$i"; done | sed 's/^lib//'`
@ -1524,6 +1526,7 @@ AC_SUBST(RUBY_INSTALL_NAME)
AC_SUBST(rubyw_install_name) AC_SUBST(rubyw_install_name)
AC_SUBST(RUBYW_INSTALL_NAME) AC_SUBST(RUBYW_INSTALL_NAME)
AC_SUBST(RUBY_SO_NAME) AC_SUBST(RUBY_SO_NAME)
AC_SUBST(LIBMINIRUBY_A)
AC_SUBST(LIBRUBY_A) AC_SUBST(LIBRUBY_A)
AC_SUBST(LIBRUBY_SO) AC_SUBST(LIBRUBY_SO)
AC_SUBST(LIBRUBY_ALIASES) AC_SUBST(LIBRUBY_ALIASES)