summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-20 22:25:38 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-20 22:25:38 +0000
commitea8c8251aace1dc57d22d863f58f7bb9ef1641e1 (patch)
treef71d968500bb9e7d1f3b69d8166258750e9ec38f
parentb8031a4517c12b2540616edba42f29a2fcaf088d (diff)
merge revision(s) 30401:
* win32/README.win32: note to need NT based OS to build ruby. * win32/{configure.bat,setup.mak}: backport current build method from trunk. [ruby-dev:42893] (#4206) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@30401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@31658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--version.h2
-rw-r--r--win32/README.win328
-rwxr-xr-xwin32/configure.bat35
-rw-r--r--win32/setup.mak6
5 files changed, 52 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 3b75de75d8..c5af272953 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Fri May 20 23:10:07 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/README.win32: note to need NT based OS to build ruby.
+
+ * win32/{configure.bat,setup.mak}: backport current build method from
+ trunk. [ruby-dev:42893] (#4206)
+
Fri May 20 23:06:31 2011 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
* Backported the fix at
diff --git a/version.h b/version.h
index 5e6d988f6e..4fcb402462 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2011-05-20"
#define RUBY_VERSION_CODE 187
#define RUBY_RELEASE_CODE 20110520
-#define RUBY_PATCHLEVEL 335
+#define RUBY_PATCHLEVEL 337
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
diff --git a/win32/README.win32 b/win32/README.win32
index e7d589759c..2c03cbafc0 100644
--- a/win32/README.win32
+++ b/win32/README.win32
@@ -4,13 +4,15 @@
== Requirement
-(1) Visual C++ 5.0 or later.
+(1) Windows 2000 or later (NT based kernel).
-(2) If you want to run `((%nmake clean%))' or `((%nmake distclean%))'
+(2) Visual C++ 6.0 or later.
+
+(3) If you want to run `((%nmake clean%))' or `((%nmake distclean%))'
properly, you must install UNIX compatible `((%rm%))' command on
your ((|PATH|)) if you want to clean after compile.
-(3) Please set environment variable (({INCLUDE})), (({LIB})), (({PATH}))
+(4) Please set environment variable (({INCLUDE})), (({LIB})), (({PATH}))
to run required commands properly from the command line.
Note: building ruby requires following commands.
diff --git a/win32/configure.bat b/win32/configure.bat
index f4f24a5ed7..07c59d9a25 100755
--- a/win32/configure.bat
+++ b/win32/configure.bat
@@ -8,6 +8,7 @@ echo>> ~tmp~.mak conf = %0
echo>> ~tmp~.mak $(conf:\=/): nul
echo>> ~tmp~.mak @del ~tmp~.mak
echo>> ~tmp~.mak @-$(MAKE) -l$(MAKEFLAGS) -f $(@D)/setup.mak \
+echo>confargs.tmp #define CONFIGURE_ARGS \
:loop
if "%1" == "" goto :end
if "%1" == "--prefix" goto :prefix
@@ -24,59 +25,81 @@ if "%1" == "--so-name" goto :soname
if "%1" == "--enable-install-doc" goto :enable-rdoc
if "%1" == "--disable-install-doc" goto :disable-rdoc
if "%1" == "--extout" goto :extout
+echo %1| findstr "^--with-.*-dir$" > nul
+if not errorlevel 1 goto :withdir
+echo %1| findstr "^--with-.*-include$" > nul
+if not errorlevel 1 goto :withdir
+echo %1| findstr "^--with-.*-lib$" > nul
+if not errorlevel 1 goto :withdir
if "%1" == "-h" goto :help
if "%1" == "--help" goto :help
- echo>> ~tmp~.mak "%1" \
+ echo>>confargs.tmp %1 \
shift
goto :loop
:srcdir
echo>> ~tmp~.mak "srcdir=%2" \
+ echo>>confargs.tmp %1=%2 \
shift
shift
goto :loop
:prefix
echo>> ~tmp~.mak "prefix=%2" \
+ echo>>confargs.tmp %1=%2 \
shift
shift
goto :loop
:suffix
echo>> ~tmp~.mak "RUBY_SUFFIX=%2" \
+ echo>>confargs.tmp %1=%2 \
shift
shift
goto :loop
:installname
echo>> ~tmp~.mak "RUBY_INSTALL_NAME=%2" \
+ echo>>confargs.tmp %1=%2 \
shift
shift
goto :loop
:soname
echo>> ~tmp~.mak "RUBY_SO_NAME=%2" \
+ echo>>confargs.tmp %1=%2 \
shift
shift
goto :loop
:target
echo>> ~tmp~.mak "%2" \
+ echo>>confargs.tmp %1=%2 \
shift
shift
goto :loop
:extstatic
echo>> ~tmp~.mak "EXTSTATIC=static" \
+ echo>>confargs.tmp %1 \
shift
goto :loop
:winsock2
echo>> ~tmp~.mak "USE_WINSOCK2=1" \
+ echo>>confargs.tmp %1 \
shift
goto :loop
:enable-rdoc
echo>> ~tmp~.mak "RDOCTARGET=install-doc" \
+ echo>>confargs.tmp %1 \
shift
goto :loop
:disable-rdoc
echo>> ~tmp~.mak "RDOCTARGET=install-nodoc" \
+ echo>>confargs.tmp %1 \
shift
goto :loop
:extout
echo>> ~tmp~.mak "EXTOUT=%2" \
+ echo>>confargs.tmp %1=%2 \
+ shift
+ shift
+goto :loop
+:withdir
+ echo>>confargs.tmp %1=%2 \
shift
shift
goto :loop
@@ -92,9 +115,17 @@ goto :loop
echo --with-winsock2 link winsock2
echo --with-static-linked-ext link external modules statically
echo --enable-install-doc install rdoc indexes during install
+ del *.tmp
del ~tmp~.mak
goto :exit
:end
-echo>> ~tmp~.mak WIN32DIR=$(@D)
+echo>> ~tmp~.mak WIN32DIR=$(@D:\=/)
+echo.>>confargs.tmp
+echo>confargs.c #define $ $$
+type>>confargs.c confargs.tmp
+echo>>confargs.c configure_args = CONFIGURE_ARGS
+echo>>confargs.c #undef $
+cl -EP confargs.c >> ~tmp~.mak 2>nul
+del *.tmp > nul
nmake -alf ~tmp~.mak
:exit
diff --git a/win32/setup.mak b/win32/setup.mak
index fc5fc90f12..a693c243ba 100644
--- a/win32/setup.mak
+++ b/win32/setup.mak
@@ -165,7 +165,13 @@ $(CPU) = $(PROCESSOR_LEVEL)
@echo $(CPU) = 6>>$(MAKEFILE)
-epilogue-: nul
+!if exist(confargs.c)
+ @$(APPEND)
+ @$(CPP) confargs.c 2>&1 | findstr "! =" >> $(MAKEFILE)
+ @del confargs.c
+!endif
@type << >>$(MAKEFILE)
+
# OS = $(OS)
# RUBY_INSTALL_NAME = ruby
# RUBY_SO_NAME = $$(RT)-$$(RUBY_INSTALL_NAME)$$(MAJOR)$$(MINOR)