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:
parent
00e55418ce
commit
7315b449f3
4 changed files with 24 additions and 15 deletions
|
@ -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.
|
||||
|
||||
* Makefile.in(h: use EXPLOBJS.
|
||||
* common.mk, Makefile.in: generate libminiruby-static.a
|
||||
which contains prelude.o for miniruby.
|
||||
|
||||
Sat Nov 10 18:10:07 2007 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
|
|
12
Makefile.in
12
Makefile.in
|
@ -66,6 +66,7 @@ MAJOR= @MAJOR@
|
|||
MINOR= @MINOR@
|
||||
TEENY= @TEENY@
|
||||
|
||||
LIBMINIRUBY_A = @LIBMINIRUBY_A@
|
||||
LIBRUBY_A = @LIBRUBY_A@
|
||||
LIBRUBY_SO = @LIBRUBY_SO@
|
||||
LIBRUBY_ALIASES= @LIBRUBY_ALIASES@
|
||||
|
@ -105,7 +106,7 @@ all:
|
|||
|
||||
miniruby$(EXEEXT):
|
||||
@$(RM) $@
|
||||
$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(MINIOBJS) $(LIBRUBY_A) $(LIBS) $(OUTFLAG)$@
|
||||
$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(MINIOBJS) $(LIBMINIRUBY_A) $(LIBS) $(OUTFLAG)$@
|
||||
|
||||
$(PROGRAM):
|
||||
@$(RM) $@
|
||||
|
@ -114,14 +115,19 @@ $(PROGRAM):
|
|||
# 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
|
||||
# supported.
|
||||
$(LIBMINIRUBY_A):
|
||||
@$(RM) $@
|
||||
$(AR) $(ARFLAGS) $@ $(OBJS) prelude.$(OBJEXT) $(DMYEXT)
|
||||
@-$(RANLIB) $@ 2> /dev/null || true
|
||||
|
||||
$(LIBRUBY_A):
|
||||
@$(RM) $@
|
||||
$(AR) $(ARFLAGS) $@ $(OBJS) $(EXPLOBJS) $(DMYEXT)
|
||||
$(AR) $(ARFLAGS) $@ $(OBJS) ext_prelude.$(OBJEXT) $(DMYEXT)
|
||||
@-$(RANLIB) $@ 2> /dev/null || true
|
||||
|
||||
$(LIBRUBY_SO):
|
||||
@-$(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; \
|
||||
File.symlink "$(LIBRUBY_SO)", link}' \
|
||||
$(LIBRUBY_ALIASES) || true
|
||||
|
|
17
common.mk
17
common.mk
|
@ -16,7 +16,6 @@ RDOCOUT = $(EXTOUT)/rdoc
|
|||
DMYEXT = dmyext.$(OBJEXT)
|
||||
MAINOBJ = main.$(OBJEXT)
|
||||
EXTOBJS =
|
||||
EXPLOBJS = ext_prelude.$(OBJEXT)
|
||||
DLDOBJS = $(DMYEXT)
|
||||
|
||||
ENCOBJS = ascii.$(OBJEXT) \
|
||||
|
@ -102,13 +101,15 @@ all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY)
|
|||
@$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS)
|
||||
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):
|
||||
@exit > $@
|
||||
|
@ -117,8 +118,8 @@ $(STATIC_RUBY)$(EXEEXT): $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A)
|
|||
@$(RM) $@
|
||||
$(PURIFY) $(CC) $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A) $(MAINLIBS) $(EXTLIBS) $(LIBS) $(OUTFLAG)$@ $(LDFLAGS) $(XLDFLAGS)
|
||||
|
||||
ruby.imp: $(OBJS) $(EXPLOBJS)
|
||||
@$(NM) -Pgp $(OBJS) $(EXPLOBJS) | awk 'BEGIN{print "#!"}; $$2~/^[BD]$$/{print $$1}' | sort -u -o $@
|
||||
ruby.imp: $(OBJS) prelude.$(OBJEXT)
|
||||
@$(NM) -Pgp $(OBJS) prelude.$(OBJEXT) | awk 'BEGIN{print "#!"}; $$2~/^[BD]$$/{print $$1}' | sort -u -o $@
|
||||
|
||||
install: install-nodoc $(RDOCTARGET)
|
||||
install-all: install-nodoc install-doc
|
||||
|
@ -296,7 +297,7 @@ clear-installed-list:
|
|||
|
||||
clean: clean-ext 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) *.inc
|
||||
clean-ext:
|
||||
|
|
|
@ -1287,6 +1287,7 @@ AC_SUBST(RUNRUBY)
|
|||
AC_SUBST(EXTOUT, [${EXTOUT=.ext}])
|
||||
|
||||
FIRSTMAKEFILE=""
|
||||
LIBMINIRUBY_A='libmini$(RUBY_SO_NAME)-static.a'
|
||||
LIBRUBY_A='lib$(RUBY_SO_NAME)-static.a'
|
||||
LIBRUBY='$(LIBRUBY_A)'
|
||||
LIBRUBYARG_STATIC='-l$(RUBY_SO_NAME)-static'
|
||||
|
@ -1437,6 +1438,7 @@ case "$target_os" in
|
|||
;;
|
||||
os2-emx)
|
||||
CFLAGS="$CFLAGS -DOS2 -Zmts"
|
||||
LIBMINIRUBY_A=`echo $LIBMINIRUBY_A | sed 's/^lib//'`
|
||||
LIBRUBY_A=`echo $LIBRUBY_A | 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//'`
|
||||
|
@ -1524,6 +1526,7 @@ AC_SUBST(RUBY_INSTALL_NAME)
|
|||
AC_SUBST(rubyw_install_name)
|
||||
AC_SUBST(RUBYW_INSTALL_NAME)
|
||||
AC_SUBST(RUBY_SO_NAME)
|
||||
AC_SUBST(LIBMINIRUBY_A)
|
||||
AC_SUBST(LIBRUBY_A)
|
||||
AC_SUBST(LIBRUBY_SO)
|
||||
AC_SUBST(LIBRUBY_ALIASES)
|
||||
|
|
Loading…
Reference in a new issue