Skip to content

Commit

Permalink
eban
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
eban committed Jul 25, 2000
1 parent 0b9c292 commit 1b3fa15
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 30 deletions.
12 changes: 11 additions & 1 deletion 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>

Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Expand Up @@ -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
Expand Down
11 changes: 9 additions & 2 deletions configure.in
Expand Up @@ -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
Expand All @@ -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
;;
*)
Expand Down
29 changes: 6 additions & 23 deletions 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)
8 changes: 5 additions & 3 deletions instruby.rb
Expand Up @@ -36,9 +36,11 @@
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
Expand Down

0 comments on commit 1b3fa15

Please sign in to comment.