1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/extmk.rb, win32/Makefile.sub, win32/configure.bat,

win32/setup.mak: --with-static-linked-ext support on mswin32.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2004-01-19 04:10:53 +00:00
parent 5bcd6bd99f
commit fe5b6676b1
5 changed files with 34 additions and 13 deletions

View file

@ -1,3 +1,8 @@
Mon Jan 19 13:09:21 2004 NAKAMURA Usaku <usa@ruby-lang.org>
* ext/extmk.rb, win32/Makefile.sub, win32/configure.bat,
win32/setup.mak: --with-static-linked-ext support on mswin32.
Mon Jan 19 06:49:07 2004 Tadayoshi Funaba <tadf@dotrb.org>
* lib/date.rb: zone was wrong when it was behind UTC.

View file

@ -107,8 +107,10 @@ def extmake(target)
$extflags ||= ""
$extlibs ||= []
$extpath ||= []
$extflags += " " + $DLDFLAGS unless $DLDFLAGS.empty?
$extflags += " " + $LDFLAGS unless $LDFLAGS.empty?
unless $mswin
$extflags += " " + $DLDFLAGS unless $DLDFLAGS.empty?
$extflags += " " + $LDFLAGS unless $LDFLAGS.empty?
end
$extlibs = merge_libs($extlibs, $libs.split, $LOCAL_LIBS.split)
$extpath |= $LIBPATH
end

View file

@ -134,7 +134,13 @@ LIBRUBY_SO = $(RUBY_SO_NAME).dll
LIBRUBY = $(RUBY_SO_NAME).lib
LIBRUBYARG = $(LIBRUBY)
!if !defined(EXTSTATIC)
EXTSTATIC =
!endif
EXTOBJS =
DLDOBJS =
DMYEXT = dmyext.obj
MAINOBJ = main.obj
WINMAINOBJ = winmain.obj
@ -397,9 +403,9 @@ s,@srcdir@,$(srcdir),;t t
s,@top_srcdir@,$(srcdir),;t t
<<KEEP
miniruby$(EXEEXT): $(OBJS) $(MAINOBJ) dmyext.obj
miniruby$(EXEEXT): $(OBJS) $(MAINOBJ) $(DMYEXT)
@echo. $(LIBS)
$(PURIFY) $(CC) $(MAINOBJ) dmyext.obj $(OBJS) $(LIBS) -Fe$@ $(LDFLAGS)
$(PURIFY) $(CC) $(MAINOBJ) $(DMYEXT) $(OBJS) $(LIBS) -Fe$@ $(LDFLAGS)
$(PROGRAM): $(MAINOBJ) $(LIBRUBY_SO) $*.res
$(PURIFY) $(CC) $(MAINOBJ) $*.res \
@ -409,15 +415,15 @@ $(WPROGRAM): $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $*.res
$(PURIFY) $(CC) $(MAINOBJ) $(WINMAINOBJ) $*.res \
-Fe$@ $(LIBRUBYARG) $(LDFLAGS) $(XLDFLAGS) -subsystem:Windows
$(LIBRUBY_A): $(OBJS) dmyext.obj
$(AR) $(ARFLAGS)$@ $(OBJS) dmyext.obj
$(LIBRUBY_A): $(OBJS) $(DMYEXT)
$(AR) $(ARFLAGS)$@ $(OBJS) $(DMYEXT)
$(LIBRUBY): $(RUBYDEF)
$(AR) $(ARFLAGS)$@ -def:$(RUBYDEF)
$(LIBRUBY_SO): $(LIBRUBY_A) $(EXTOBJS) $(RUBYDEF) $*.res
@echo. $(EXTOBJS)
$(LIBRUBY_LDSHARED) $(MAINOBJ) $(EXTOBJS) $(LIBRUBY_A) $*.res $(LIBS) \
$(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $*.res
@echo. $(DLDOBJS)
$(LIBRUBY_LDSHARED) $(MAINOBJ) $(DLDOBJS) $(LIBRUBY_A) $*.res $(LIBS) \
-Fe$@ $(LDFLAGS) $(LIBRUBY_DLDFLAGS)
$(RUBYDEF): $(LIBRUBY_A) miniruby$(EXEEXT)

View file

@ -15,6 +15,7 @@ if "%1" == "--srcdir" goto :srcdir
if "%1" == "srcdir" goto :srcdir
if "%1" == "--target" goto :target
if "%1" == "target" goto :target
if "%1" == "--with-static-linked-ext" goto :extstatic
if "%1" == "-h" goto :help
if "%1" == "--help" goto :help
echo>> ~tmp~.mak "%1" \
@ -35,14 +36,20 @@ goto :loop
shift
shift
goto :loop
:extstatic
echo>> ~tmp~.mak "EXTSTATIC=static" \
shift
goto :loop
:help
echo Configuration:
echo --help display this help
echo --srcdir=DIR find the sources in DIR [configure dir or `..']
echo --help display this help
echo --srcdir=DIR find the sources in DIR [configure dir or `..']
echo Installation directories:
echo --prefix=PREFIX install files in PREFIX [/usr]
echo --prefix=PREFIX install files in PREFIX [/usr]
echo System types:
echo --target=TARGET configure for TARGET [i386-mswin32]
echo --target=TARGET configure for TARGET [i386-mswin32]
echo Optional Package:
echo --with-static-linked-ext link external modules statically
del ~tmp~.mak
goto :exit
:end

View file

@ -36,6 +36,7 @@ alpha-$(OS): -prologue- -alpha- -epilogue-
### Makefile for ruby $(OS) ###
srcdir = $(srcdir:\=/)
prefix = $(prefix:\=/)
EXTSTATIC = $(EXTSTATIC)
<<
@cl -nologo -EP -I$(srcdir) <<"Creating $(MAKEFILE)" >> $(MAKEFILE)
#include "version.h"