ruby-changes:18379
From: usa <ko1@a...>
Date: Mon, 27 Dec 2010 15:58:05 +0900 (JST)
Subject: [ruby-changes:18379] Ruby:r30401 (ruby_1_8): * win32/README.win32: note to need NT based OS to build ruby.
usa 2010-12-27 15:57:52 +0900 (Mon, 27 Dec 2010) New Revision: 30401 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30401 Log: * 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) Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/win32/README.win32 branches/ruby_1_8/win32/configure.bat branches/ruby_1_8/win32/setup.mak Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 30400) +++ ruby_1_8/ChangeLog (revision 30401) @@ -1,3 +1,10 @@ +Mon Dec 27 15:55:36 2010 NAKAMURA Usaku <usa@r...> + + * 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) + Thu Dec 23 12:11:22 2010 Tanaka Akira <akr@f...> * lib/resolv.rb (Resolv::IPv4::Regex): make it only accept 0 to 255. Index: ruby_1_8/win32/configure.bat =================================================================== --- ruby_1_8/win32/configure.bat (revision 30400) +++ ruby_1_8/win32/configure.bat (revision 30401) @@ -8,6 +8,7 @@ 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,62 +25,84 @@ 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=rdoc" \ + echo>>confargs.tmp %1 \ shift goto :loop :disable-rdoc echo>> ~tmp~.mak "RDOCTARGET=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 :help echo Configuration: echo --help display this help @@ -92,9 +115,17 @@ 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.>>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 Index: ruby_1_8/win32/setup.mak =================================================================== --- ruby_1_8/win32/setup.mak (revision 30400) +++ ruby_1_8/win32/setup.mak (revision 30401) @@ -169,7 +169,13 @@ @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) Index: ruby_1_8/win32/README.win32 =================================================================== --- ruby_1_8/win32/README.win32 (revision 30400) +++ ruby_1_8/win32/README.win32 (revision 30401) @@ -4,13 +4,15 @@ == Requirement -(1) Visual C++ 6.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. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/