From 4e4b377a8e8573961709002421d91afd37e3a9e0 Mon Sep 17 00:00:00 2001 From: eban Date: Sun, 2 Jul 2000 15:57:18 +0000 Subject: 2000-07-02 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 12 ++++++++++++ configure.in | 40 ++++++++++++++++++++-------------------- cygwin/GNUmakefile.in | 24 ++++++++++++++++-------- ext/extmk.rb.in | 10 ++++++---- lib/mkmf.rb | 2 +- util.c | 18 ------------------ version.h | 4 ++-- 7 files changed, 57 insertions(+), 53 deletions(-) diff --git a/ChangeLog b/ChangeLog index aee7a9fea0..752e5e27ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Sun Jul 2 21:17:37 2000 WATANABE Hirofumi + + * 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 * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.25. diff --git a/configure.in b/configure.in index b26fe38861..db2a68124d 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 d4ee88d1d1..e7b7b5c5dd 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 272a508e0f..7622880a1a 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 d14f9bd55a..1f9373a225 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 a8860672c4..7d912999b2 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 5a88524413..50c0c6eac8 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 -- cgit v1.2.3