summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--Makefile.in2
-rw-r--r--configure.in11
-rw-r--r--cygwin/GNUmakefile.in29
-rw-r--r--instruby.rb8
5 files changed, 32 insertions, 30 deletions
diff --git a/ChangeLog b/ChangeLog
index 29dc8c76b31..14b92b7d2d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,17 @@
Tue Jul 25 19:03:04 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
* 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>
diff --git a/Makefile.in b/Makefile.in
index e4b6fd5b6e9..3c1b14825ec 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -97,7 +97,7 @@ $(LIBRUBY_A): $(OBJS) dmyext.@OBJEXT@
@-@RANLIB@ $@ 2> /dev/null || true
$(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; \
File.symlink "$(LIBRUBY_SO)", link}' \
$(LIBRUBY_ALIASES) || true
diff --git a/configure.in b/configure.in
index 7387fdbfda1..f7fa8a9ad6e 100644
--- a/configure.in
+++ b/configure.in
@@ -824,9 +824,16 @@ case "$target_os" in
esac
;;
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_A='lib$(RUBY_INSTALL_NAME)s.a'
+ LIBRUBY='lib$(RUBY_INSTALL_NAME).a'
LIBRUBYARG='-L. -l$(RUBY_INSTALL_NAME)'
FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in
case "$target_os" in
@@ -837,7 +844,7 @@ case "$target_os" in
LIBOBJS="$LIBOBJS win32.o"
CFLAGS="-DNT -D__MSVCRT__ $CFLAGS"
CCDLFLAGS=-DIMPORT
- SOLIBS='-lwsock32 -lmsvcrt' ;;
+ SOLIBS='$(LIBS)' ;;
esac
;;
*)
diff --git a/cygwin/GNUmakefile.in b/cygwin/GNUmakefile.in
index d29cefdec50..cb2b47020ba 100644
--- a/cygwin/GNUmakefile.in
+++ b/cygwin/GNUmakefile.in
@@ -1,35 +1,18 @@
include Makefile
-ARCH=@arch@
ENABLE_SHARED=@ENABLE_SHARED@
ifneq (,$(findstring no, $(ENABLE_SHARED)))
- DLL = dummy.exe
- DLLNAME = $(RUBY_INSTALL_NAME)$(EXEEXT)
- 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 =
+ EXTOBJS = $(RUBY_INSTALL_NAME).exp
+ LIBRUBYARG = $(LIBRUBY_A)
endif
RUBYDEF = $(RUBY_INSTALL_NAME).def
-rbconfig.rb: $(DLL)
+$(LIBRUBY_SO): $(RUBYDEF)
+$(LIBRUBY): $(LIBRUBY_SO)
-$(DLL): $(OBJS) dmyext.@OBJEXT@ $(RUBYDEF)
- $(LDSHARED) $(DLDFLAGS) -o $(DLL) --output-lib=$(LIBRUBY_SO) \
- --dllname=$(DLLNAME) --add-stdcall-alias --def=$(RUBYDEF) \
- $(RUBYEXP) $(OBJS) dmyext.@OBJEXT@ $(LIBS)
-
-$(RUBYDEF): $(OBJS) dmyext.@OBJEXT@
+$(RUBYDEF): $(LIBRUBY_A)
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)
diff --git a/instruby.rb b/instruby.rb
index 809ab86f3f7..0d06ad93ce9 100644
--- a/instruby.rb
+++ b/instruby.rb
@@ -36,9 +36,11 @@ for dll in Dir['*.dll']
File.install dll, "#{bindir}/#{dll}", 0755, true
end
File.makedirs libdir, true
-for lib in [CONFIG["LIBRUBY_SO"]]
- if File.exist? lib
- File.install lib, libdir, 0555, true
+if CONFIG["LIBRUBY"] != CONFIG["LIBRUBY_A"]
+ for lib in [CONFIG["LIBRUBY"]]
+ if File.exist? lib
+ File.install lib, libdir, 0555, true
+ end
end
end
Dir.chdir libdir