summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--configure.in40
-rw-r--r--cygwin/GNUmakefile.in24
-rw-r--r--ext/extmk.rb.in10
-rw-r--r--lib/mkmf.rb2
-rw-r--r--util.c18
-rw-r--r--version.h4
7 files changed, 57 insertions, 53 deletions
diff --git a/ChangeLog b/ChangeLog
index aee7a9f..752e5e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Sun Jul 2 21:17:37 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+
+ * configure.in: support without --enable-shared for cygwin/mingw32.
+
+ * cygwin/GNUmakefile: ditto.
+
+ * ext/extmk.rb.in: use null device if it exists for cross-compiling.
+
+ * lib/mkmf.rb: ditto.
+
+ * util.c (ruby_mktemp): remove unused ruby_mktemp().
+
Sun Jul 2 03:37:50 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
* lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.25.
diff --git a/configure.in b/configure.in
index b26fe38..db2a681 100644
--- a/configure.in
+++ b/configure.in
@@ -723,6 +723,8 @@ LIBRUBY_LDSHARED=$LDSHARED
LIBRUBY_DLDFLAGS=$DLDFLAGS
LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR).$(TEENY)'
LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so'
+ENABLE_SHARED=no
+
AC_ARG_ENABLE(enable-shared,
[--enable-shared build a shared library for Ruby. ],
[enable_shared=$enableval])
@@ -730,6 +732,7 @@ if test "$enable_shared" = 'yes'; then
LIBRUBY='$(LIBRUBY_SO)'
LIBRUBYARG='-L. -l$(RUBY_INSTALL_NAME)'
CFLAGS="$CFLAGS $CCDLFLAGS"
+ ENABLE_SHARED=yes
case "$target_os" in
sunos4*)
LIBRUBY_ALIASES='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_INSTALL_NAME).so'
@@ -779,20 +782,6 @@ if test "$enable_shared" = 'yes'; then
;;
esac
;;
- cygwin*|mingw*)
- LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).a'
- LIBRUBY_ALIASES=''
- LIBRUBY_A='lib$(RUBY_INSTALL_NAME)s.a'
- LIBRUBYARG='-L. -l$(RUBY_INSTALL_NAME)'
- FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in
- case "$target_os" in
- cygwin*)
- CCDLFLAGS=-DUSEIMPORTLIB ;;
- mingw*)
- CCDLFLAGS=-DIMPORT
- SOLIBS='-lwsock32 -lmsvcrt' ;;
- esac
- ;;
*)
;;
esac
@@ -833,12 +822,22 @@ case "$target_os" in
;;
esac
;;
- cygwin*)
- LIBOBJS="$LIBOBJS strftime.o"
- ;;
- mingw*)
- LIBOBJS="$LIBOBJS win32.o"
- CFLAGS="-DNT -D__MSVCRT__ $CFLAGS"
+ cygwin*|mingw*)
+ LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).a'
+ LIBRUBY_ALIASES=''
+ LIBRUBY_A='lib$(RUBY_INSTALL_NAME)s.a'
+ LIBRUBYARG='-L. -l$(RUBY_INSTALL_NAME)'
+ FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in
+ case "$target_os" in
+ cygwin*)
+ LIBOBJS="$LIBOBJS strftime.o"
+ CCDLFLAGS=-DUSEIMPORTLIB ;;
+ mingw*)
+ LIBOBJS="$LIBOBJS win32.o"
+ CFLAGS="-DNT -D__MSVCRT__ $CFLAGS"
+ CCDLFLAGS=-DIMPORT
+ SOLIBS='-lwsock32 -lmsvcrt' ;;
+ esac
;;
*)
;;
@@ -854,6 +853,7 @@ AC_SUBST(LIBRUBY)
AC_SUBST(LIBRUBYARG)
AC_SUBST(SOLIBS)
AC_SUBST(DLDLIBS)
+AC_SUBST(ENABLE_SHARED)
ri_prefix=
test "$program_prefix" != NONE &&
diff --git a/cygwin/GNUmakefile.in b/cygwin/GNUmakefile.in
index d4ee88d..e7b7b5c 100644
--- a/cygwin/GNUmakefile.in
+++ b/cygwin/GNUmakefile.in
@@ -1,18 +1,26 @@
include Makefile
ARCH=@arch@
+ENABLE_SHARED=@ENABLE_SHARED@
-ifneq (,$(findstring mingw, $(ARCH)))
-DLL = rubymg.dll
-DLLWRAP_FLAGS =
+ifneq (,$(findstring no, $(ENABLE_SHARED)))
+ DLL = dummy.exe
+ DLLNAME = ruby.exe
+ RUBYEXP = --output-exp=ruby.exp
+ MAINOBJ := ruby.exp $(MAINOBJ)
+ LIBRUBYARG := librubys.a
else
-DLL = rubycw.dll
-DLLWRAP_FLAGS = -Wl,-e,__cygwin_noncygwin_dll_entry@12
+ ifneq (,$(findstring mingw, $(ARCH)))
+ DLL = rubymg.dll
+ DLLNAME = rubymg.dll
+ else
+ DLL = rubycw.dll
+ DLLNAME = rubycw.dll
+ endif
+ RUBYEXP =
endif
-ifeq (,$(strip $(LIBRUBY_ALIASES)))
miniruby$(EXEEXT): $(DLL)
-endif
$(DLL): $(OBJS) dmyext.o
- $(LDSHARED) $(DLDFLAGS) -o $(DLL) --output-lib=$(LIBRUBY_SO) --dllname=$(DLL) --add-stdcall-alias $(OBJS) dmyext.o $(LIBS)
+ $(LDSHARED) $(DLDFLAGS) -o $(DLL) --output-lib=$(LIBRUBY_SO) --dllname=$(DLLNAME) --add-stdcall-alias $(RUBYEXP) $(OBJS) dmyext.o $(LIBS)
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index 272a508..7622880 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -64,10 +64,12 @@ end
LINK = "@CC@ -o conftest -I#$topdir -I#$top_srcdir #{CFLAGS} -I#$includedir @LDFLAGS@ %s %s conftest.c %s %s @LIBS@"
CPP = "@CPP@ @CPPFLAGS@ -I#$topdir -I#$top_srcdir #{CFLAGS} -I#$includedir %s %s conftest.c"
-if /cygwin|mswin32|djgpp|mingw|m68k-human|i386-os2_emx/i =~ RUBY_PLATFORM
- $null = open("nul", "w")
+if FileTest.readable? 'nul'
+ $null = open('nul', 'w')
+elsif FileTest.readable? '/dev/null'
+ $null = open('/dev/null', 'w')
else
- $null = open("/dev/null", "w")
+ $null = open('test.log', 'w')
end
$orgerr = $stderr.dup
@@ -342,7 +344,7 @@ def create_makefile(target)
$DLDFLAGS = '@DLDFLAGS@'
- if $configure_args['--enable-shared']
+ if $configure_args['--enable-shared'] or /cygwin|mingw/ === RUBY_PLATFORM
$libs = "@LIBRUBYARG@ " + $libs
$DLDFLAGS = $DLDFLAGS + " -L" + $topdir
end
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index d14f9bd..1f9373a 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -341,7 +341,7 @@ def create_makefile(target)
end
$DLDFLAGS = CONFIG["DLDFLAGS"]
- if $configure_args['--enable-shared']
+ if $configure_args['--enable-shared'] or /cygwin|mingw/ == RUBY_PLATFORM
$libs = CONFIG["LIBRUBYARG"] + " " + $libs
$DLDFLAGS += " -L" + CONFIG["libdir"]
end
diff --git a/util.c b/util.c
index a886067..7d91299 100644
--- a/util.c
+++ b/util.c
@@ -126,24 +126,6 @@ check_dir(dir)
return dir;
}
-char *
-ruby_mktemp()
-{
- char *dir;
- char *buf;
-
- dir = check_dir(getenv("TMP"));
- if (!dir) dir = check_dir(getenv("TMPDIR"));
- if (!dir) dir = "/tmp";
-
- buf = ALLOC_N(char,strlen(dir)+10);
- sprintf(buf, "%s/rbXXXXXX", dir);
- dir = mktemp(buf);
- if (dir == NULL) free(buf);
-
- return dir;
-}
-
#if defined(MSDOS) || defined(__CYGWIN32__) || defined(NT)
/*
* Copyright (c) 1993, Intergraph Corporation
diff --git a/version.h b/version.h
index 5a88524..50c0c6e 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
#define RUBY_VERSION "1.5.4"
-#define RUBY_RELEASE_DATE "2000-06-29"
+#define RUBY_RELEASE_DATE "2000-07-02"
#define RUBY_VERSION_CODE 154
-#define RUBY_RELEASE_CODE 20000629
+#define RUBY_RELEASE_CODE 20000702