Skip to content

Commit

Permalink
* configure.in (LIBRUBY): rename to lib$(LIBRUBY_SO).a on Cygwin/MinGW.
Browse files Browse the repository at this point in the history
* configure.in, cygwin/GNUmakefile: use dllwrap when --disable-shared
  is specified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
eban committed Jun 11, 2002
1 parent 65caf01 commit 7f80a18
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Tue Jun 11 19:20:34 2002 WATANABE Hirofumi <[email protected]>

* configure.in (LIBRUBY): rename to lib$(LIBRUBY_SO).a on Cygwin/MinGW.

* configure.in, cygwin/GNUmakefile: use dllwrap when --disable-shared
is specified.

Tue Jun 11 13:18:47 2002 Shugo Maeda <[email protected]>

* lib/net/ftp.rb (noop): new method.
Expand Down
6 changes: 4 additions & 2 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ case "$target_os" in
cygwin*|mingw*)
AC_CHECK_TOOL(NM, nm)
AC_CHECK_TOOL(WINDRES, windres)
AC_CHECK_TOOL(DLLWRAP, dllwrap)
target_cpu=`echo $target_cpu | sed s/i.86/i386/`
: ${enable_shared=yes}
;;
Expand Down Expand Up @@ -1044,13 +1045,14 @@ case "$target_os" in
if test x"$enable_shared" = xyes; then
LIBRUBY_SO='$(RUBY_SO_NAME)'.dll
LIBRUBY_DLDFLAGS='-Wl,--out-implib=$(LIBRUBY) $(RUBYDEF)'
LIBRUBY='lib$(LIBRUBY_SO).a'
else
LIBRUBY_SO=dummy
LIBRUBY_DLDFLAGS='-Wl,--output-exp=$(RUBY_INSTALL_NAME).exp,--out-implib=$(LIBRUBY) $(RUBYDEF)'
LIBRUBY_DLDFLAGS=''
LIBRUBY='lib$(RUBY_SO_NAME).a'
fi
LIBRUBY_ALIASES=''
LIBRUBY_A='lib$(RUBY_INSTALL_NAME)s.a'
LIBRUBY='lib$(RUBY_SO_NAME).a'
LIBRUBYARG='-L. -l$(RUBY_SO_NAME)'
FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in
SOLIBS='$(LIBS)'
Expand Down
21 changes: 13 additions & 8 deletions cygwin/GNUmakefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@ include Makefile

ENABLE_SHARED=@ENABLE_SHARED@

ifneq (,$(findstring no, $(ENABLE_SHARED)))
EXTOBJS = $(RUBY_INSTALL_NAME).exp
LIBRUBYARG = $(LIBRUBY_A)
else
ifeq ($(ENABLE_SHARED),yes)
CPPFLAGS += -DLIBRUBY_SO=\"$(LIBRUBY_SO)\"
else
RUBY_EXP = $(RUBY_INSTALL_NAME).exp
EXTOBJS = $(RUBY_EXP)
LIBRUBYARG = $(LIBRUBY_A)
endif

ifneq (,$(findstring ruby, $(RUBY_INSTALL_NAME)))
RUBYW_INSTALL_NAME = $(subst ruby,rubyw,$(RUBY_INSTALL_NAME))
else
ifeq ($(RUBY_INSTALL_NAME),ruby)
RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME)w
else
RUBYW_INSTALL_NAME = $(subst ruby,rubyw,$(RUBY_INSTALL_NAME))
endif
WPROGRAM = $(RUBYW_INSTALL_NAME)$(EXEEXT)
RUBYDEF = $(RUBY_INSTALL_NAME).def
SOLIBS := $(LIBRUBY_SO).res.@OBJEXT@ $(SOLIBS)
EXTOBJS += $(@:$(EXEEXT)=.res.@OBJEXT@)

$(LIBRUBY_SO): $(RUBYDEF) $(LIBRUBY_SO).res.@OBJEXT@
$(LIBRUBY_SO): $(RUBYDEF) $(LIBRUBY_SO).res.@OBJEXT@ $(RUBY_EXP)
$(LIBRUBY): $(LIBRUBY_SO)

%.res.@OBJEXT@: %.rc
Expand All @@ -41,3 +42,7 @@ $(RUBYDEF): $(LIBRUBY_A)
echo EXPORTS > $(RUBYDEF)
@NM@ --extern-only --defined-only $(LIBRUBY_A) | \
@MINIRUBY@ -ne 'puts $$1 if / [CDT] _(.*)$$/' >> $(RUBYDEF)
$(RUBY_EXP): $(RUBYDEF)
@DLLWRAP@ --output-exp=$(RUBY_EXP) --output-lib=$(LIBRUBY) \
--def=$(RUBYDEF) $(LIBRUBY_A) $(LIBS) -o $(PROGRAM)
rm $(PROGRAM)

0 comments on commit 7f80a18

Please sign in to comment.