git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2000-07-25 14:46:46 +00:00
parent f8971ef1b1
commit 94089e82a1
5 changed files with 32 additions and 30 deletions

View File

@ -1,7 +1,17 @@
Tue Jul 25 19:03:04 2000 WATANABE Hirofumi <eban@os.rim.or.jp> Tue Jul 25 19:03:04 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
* cygwin/GNUmakefile: use puts instead of print, because * cygwin/GNUmakefile: use puts instead of print, because
Cygwin DLL's behavior is changed. Cygwin DLL's behavior is changed(or bug?).
* configure.in: LIBRUBY_SO='$(RUBY_INSTALL_NAME)'-$target_os.dll
on cygwin and mingw32.
* cygwin/GNUmakefile: ditto.
* Makefile.in: $(SOLIBS) should be put after dmyext.@OBJEXT@.
* instruby.rb: install $(LIBRUBY) to libdir
if $(LIBRUBY) != $(LIBRUBY_A_).
Tue Jul 25 15:16:00 2000 Yukihiro Matsumoto <matz@netlab.co.jp> Tue Jul 25 15:16:00 2000 Yukihiro Matsumoto <matz@netlab.co.jp>

View File

@ -97,7 +97,7 @@ $(LIBRUBY_A): $(OBJS) dmyext.@OBJEXT@
@-@RANLIB@ $@ 2> /dev/null || true @-@RANLIB@ $@ 2> /dev/null || true
$(LIBRUBY_SO): $(OBJS) dmyext.@OBJEXT@ $(LIBRUBY_SO): $(OBJS) dmyext.@OBJEXT@
$(LDSHARED) $(DLDFLAGS) $(SOLIBS) $(OBJS) dmyext.@OBJEXT@ -o $@ $(LDSHARED) $(DLDFLAGS) $(OBJS) dmyext.@OBJEXT@ $(SOLIBS) -o $@
@-@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

@ -824,9 +824,16 @@ case "$target_os" in
esac esac
;; ;;
cygwin*|mingw*) cygwin*|mingw*)
LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).a' if test x"$enable_shared" = xyes; then
LIBRUBY_SO='$(RUBY_INSTALL_NAME)-'$target_os.dll
LIBRUBY_DLDFLAGS='--dllname=$@ --output-lib=$(LIBRUBY) --add-stdcall-alias --def=$(RUBYDEF)'
else
LIBRUBY_SO=nul
LIBRUBY_DLDFLAGS='--output-exp=$(RUBY_INSTALL_NAME).exp --dllname=$(RUBY_INSTALL_NAME)$(EXEEXT) --output-lib=$(LIBRUBY) --add-stdcall-alias --def=$(RUBYDEF)'
fi
LIBRUBY_ALIASES='' LIBRUBY_ALIASES=''
LIBRUBY_A='lib$(RUBY_INSTALL_NAME)s.a' LIBRUBY_A='lib$(RUBY_INSTALL_NAME)s.a'
LIBRUBY='lib$(RUBY_INSTALL_NAME).a'
LIBRUBYARG='-L. -l$(RUBY_INSTALL_NAME)' LIBRUBYARG='-L. -l$(RUBY_INSTALL_NAME)'
FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in
case "$target_os" in case "$target_os" in
@ -837,7 +844,7 @@ case "$target_os" in
LIBOBJS="$LIBOBJS win32.o" LIBOBJS="$LIBOBJS win32.o"
CFLAGS="-DNT -D__MSVCRT__ $CFLAGS" CFLAGS="-DNT -D__MSVCRT__ $CFLAGS"
CCDLFLAGS=-DIMPORT CCDLFLAGS=-DIMPORT
SOLIBS='-lwsock32 -lmsvcrt' ;; SOLIBS='$(LIBS)' ;;
esac esac
;; ;;
*) *)

View File

@ -1,35 +1,18 @@
include Makefile include Makefile
ARCH=@arch@
ENABLE_SHARED=@ENABLE_SHARED@ ENABLE_SHARED=@ENABLE_SHARED@
ifneq (,$(findstring no, $(ENABLE_SHARED))) ifneq (,$(findstring no, $(ENABLE_SHARED)))
DLL = dummy.exe EXTOBJS = $(RUBY_INSTALL_NAME).exp
DLLNAME = $(RUBY_INSTALL_NAME)$(EXEEXT) LIBRUBYARG = $(LIBRUBY_A)
RUBYEXP = --output-exp=$(RUBY_INSTALL_NAME).exp
MAINOBJ := $(RUBY_INSTALL_NAME).exp $(MAINOBJ)
LIBRUBYARG := lib$(RUBY_INSTALL_NAME)s.a
else
ifneq (,$(findstring mingw, $(ARCH)))
DLL = $(RUBY_INSTALL_NAME)mg.dll
DLLNAME = $(RUBY_INSTALL_NAME)mg.dll
else
DLL = $(RUBY_INSTALL_NAME)cw.dll
DLLNAME = $(RUBY_INSTALL_NAME)cw.dll
endif
RUBYEXP =
endif endif
RUBYDEF = $(RUBY_INSTALL_NAME).def RUBYDEF = $(RUBY_INSTALL_NAME).def
rbconfig.rb: $(DLL) $(LIBRUBY_SO): $(RUBYDEF)
$(LIBRUBY): $(LIBRUBY_SO)
$(DLL): $(OBJS) dmyext.@OBJEXT@ $(RUBYDEF) $(RUBYDEF): $(LIBRUBY_A)
$(LDSHARED) $(DLDFLAGS) -o $(DLL) --output-lib=$(LIBRUBY_SO) \
--dllname=$(DLLNAME) --add-stdcall-alias --def=$(RUBYDEF) \
$(RUBYEXP) $(OBJS) dmyext.@OBJEXT@ $(LIBS)
$(RUBYDEF): $(OBJS) dmyext.@OBJEXT@
echo EXPORTS > $(RUBYDEF) echo EXPORTS > $(RUBYDEF)
@NM@ --extern-only --defined-only $(OBJS) dmyext.@OBJEXT@ | \ @NM@ --extern-only --defined-only $(LIBRUBY_A) | \
@MINIRUBY@ -ne 'puts $$1 if / [CDT] _(.*)$$/' >> $(RUBYDEF) @MINIRUBY@ -ne 'puts $$1 if / [CDT] _(.*)$$/' >> $(RUBYDEF)

View File

@ -36,10 +36,12 @@ for dll in Dir['*.dll']
File.install dll, "#{bindir}/#{dll}", 0755, true File.install dll, "#{bindir}/#{dll}", 0755, true
end end
File.makedirs libdir, true File.makedirs libdir, true
for lib in [CONFIG["LIBRUBY_SO"]] if CONFIG["LIBRUBY"] != CONFIG["LIBRUBY_A"]
for lib in [CONFIG["LIBRUBY"]]
if File.exist? lib if File.exist? lib
File.install lib, libdir, 0555, true File.install lib, libdir, 0555, true
end end
end
end end
Dir.chdir libdir Dir.chdir libdir
if File.exist? CONFIG["LIBRUBY_SO"] if File.exist? CONFIG["LIBRUBY_SO"]