diff --git a/ChangeLog b/ChangeLog index ddfc48de1..d96f8a916 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +Sun May 14 18:05:59 2000 WATANABE Hirofumi + + * Makefile.in: missing/nt.c -> win32/win32.c + + * configure.in: bug fix; static linking on mingw32 + + * cygwin/GNUmakefile.in: remove VPATH. + + * ext/extmk.rb.in: Makefile set binmode with mingw32 on cygwin32. + + * lib/mkmf.rb: ditto. + + * win32/config.h: undef HAVE_SYS_FILE_H. + Sun May 14 02:02:48 2000 WATANABE Hirofumi * lib/irb/ruby-lex.rb: '/' should be escaped in charcter class. diff --git a/Makefile.in b/Makefile.in index deffe4d7a..b2dddb45e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -212,9 +212,6 @@ strtol.@OBJEXT@: @srcdir@/missing/strtol.c strtoul.@OBJEXT@: @srcdir@/missing/strtoul.c $(CC) $(CFLAGS) $(CPPFLAGS) -c @srcdir@/missing/strtoul.c -nt.@OBJEXT@: @srcdir@/missing/nt.c - $(CC) $(CFLAGS) $(CPPFLAGS) -c @srcdir@/missing/nt.c - x68.@OBJEXT@: @srcdir@/missing/x68.c $(CC) $(CFLAGS) $(CPPFLAGS) -c @srcdir@/missing/x68.c @@ -224,6 +221,9 @@ os2.@OBJEXT@: @srcdir@/missing/os2.c dl_os2.@OBJEXT@: @srcdir@/missing/dl_os2.c $(CC) $(CFLAGS) $(CPPFLAGS) -c @srcdir@/missing/dl_os2.c +win32.@OBJEXT@: @srcdir@/win32/win32.c + $(CC) $(CFLAGS) $(CPPFLAGS) -c @srcdir@/win32/win32.c + # Prevent GNU make v3 from overflowing arg limit on SysV. .NOEXPORT: ### diff --git a/configure b/configure index dacc2e3ed..4c0687787 100644 --- a/configure +++ b/configure @@ -4958,14 +4958,10 @@ if test "$enable_shared" = 'yes'; then FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in case "$target_os" in cygwin*) - LIBOBJS="$LIBOBJS strftime.o" - CCDLFLAGS=-DUSEIMPORTLIB - ;; + CCDLFLAGS=-DUSEIMPORTLIB ;; mingw*) - LIBOBJS="$LIBOBJS win32.o" - CFLAGS="-DNT -D__MSVCRT__ $CFLAGS" CCDLFLAGS=-DIMPORT - ;; + SOLIBS='-lwsock32 -lmsvcrt' ;; esac ;; *) @@ -4974,16 +4970,16 @@ if test "$enable_shared" = 'yes'; then fi case "$target_os" in - nextstep*) + nextstep*) CFLAGS="$CFLAGS -pipe" - ;; - openstep*) + ;; + openstep*) CFLAGS="$CFLAGS -pipe" - ;; - rhasody*) + ;; + rhasody*) CFLAGS="$CFLAGS -pipe -no-precomp" - ;; - osf*) + ;; + osf*) if test "$without_gcc" = "no" ; then CFLAGS="$CFLAGS -ansi" else @@ -5001,8 +4997,15 @@ case "$target_os" in CFLAGS="$CFLAGS -std" fi ;; - *) - ;; + cygwin*) + LIBOBJS="$LIBOBJS strftime.o" + ;; + mingw*) + LIBOBJS="$LIBOBJS win32.o" + CFLAGS="-DNT -D__MSVCRT__ $CFLAGS" + ;; + *) + ;; esac @@ -5100,7 +5103,7 @@ EOF fi echo "creating config.h" -cat confdefs.h > config.h +tr -d '\015' < confdefs.h > config.h trap '' 1 2 15 cat > confcache <<\EOF diff --git a/configure.in b/configure.in index 1a33cc002..308371961 100644 --- a/configure.in +++ b/configure.in @@ -792,14 +792,10 @@ if test "$enable_shared" = 'yes'; then FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in case "$target_os" in cygwin*) - LIBOBJS="$LIBOBJS strftime.o" - CCDLFLAGS=-DUSEIMPORTLIB - ;; + CCDLFLAGS=-DUSEIMPORTLIB ;; mingw*) - LIBOBJS="$LIBOBJS win32.o" - CFLAGS="-DNT -D__MSVCRT__ $CFLAGS" CCDLFLAGS=-DIMPORT - ;; + SOLIBS='-lwsock32 -lmsvcrt' ;; esac ;; *) @@ -808,16 +804,16 @@ if test "$enable_shared" = 'yes'; then fi case "$target_os" in - nextstep*) + nextstep*) CFLAGS="$CFLAGS -pipe" - ;; - openstep*) + ;; + openstep*) CFLAGS="$CFLAGS -pipe" - ;; - rhasody*) + ;; + rhasody*) CFLAGS="$CFLAGS -pipe -no-precomp" - ;; - osf*) + ;; + osf*) if test "$without_gcc" = "no" ; then CFLAGS="$CFLAGS -ansi" else @@ -835,8 +831,15 @@ case "$target_os" in CFLAGS="$CFLAGS -std" fi ;; - *) - ;; + cygwin*) + LIBOBJS="$LIBOBJS strftime.o" + ;; + mingw*) + LIBOBJS="$LIBOBJS win32.o" + CFLAGS="-DNT -D__MSVCRT__ $CFLAGS" + ;; + *) + ;; esac AC_SUBST(LIBRUBY_LDSHARED) @@ -903,6 +906,6 @@ if test "$search_path" != ""; then fi echo "creating config.h" -cat confdefs.h > config.h +tr -d '\015' < confdefs.h > config.h AC_OUTPUT($FIRSTMAKEFILE Makefile ext/extmk.rb) diff --git a/cygwin/GNUmakefile.in b/cygwin/GNUmakefile.in index ba3a1d266..d4ee88d1d 100644 --- a/cygwin/GNUmakefile.in +++ b/cygwin/GNUmakefile.in @@ -3,7 +3,6 @@ include Makefile ARCH=@arch@ ifneq (,$(findstring mingw, $(ARCH))) -VPATH = @srcdir@/missing:@srcdir@/win32 DLL = rubymg.dll DLLWRAP_FLAGS = else @@ -11,7 +10,9 @@ DLL = rubycw.dll DLLWRAP_FLAGS = -Wl,-e,__cygwin_noncygwin_dll_entry@12 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) diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index 279906830..90e6c7159 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -348,6 +348,7 @@ def create_makefile(target) $srcdir = $top_srcdir + "/ext/" + $mdir mfile = open("Makefile", "w") + mfile.binmode if /mingw/ =~ RUBY_PLATFORM mfile.printf "\ SHELL = /bin/sh diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 1301bf0f5..0cd91f38a 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -356,6 +356,7 @@ def create_makefile(target) $objs = $objs.join(" ") mfile = open("Makefile", "w") + mfile.binmode if /mingw/ =~ RUBY_PLATFORM mfile.print <