mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
win32/configure.bat: option arguments
* win32/configure.bat: try to fix option arguments split by commas and equals here. this batch file no longer run with old command.com. * tool/mkconfig.rb: no hacks for cmd.exe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0423c207c6
commit
8825a084eb
3 changed files with 36 additions and 31 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Sun Mar 31 15:40:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* win32/configure.bat: try to fix option arguments split by commas and
|
||||||
|
equals here. this batch file no longer run with old command.com.
|
||||||
|
|
||||||
|
* tool/mkconfig.rb: no hacks for cmd.exe.
|
||||||
|
|
||||||
Sun Mar 31 13:47:04 2013 Tanaka Akira <akr@fsij.org>
|
Sun Mar 31 13:47:04 2013 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* numeric.c (rb_num2ulong_internal): New function similar to
|
* numeric.c (rb_num2ulong_internal): New function similar to
|
||||||
|
|
|
@ -116,12 +116,6 @@ File.foreach "config.status" do |line|
|
||||||
eq = win32 && vars[name] ? '<< "\n"' : '='
|
eq = win32 && vars[name] ? '<< "\n"' : '='
|
||||||
vars[name] = val
|
vars[name] = val
|
||||||
if name == "configure_args"
|
if name == "configure_args"
|
||||||
if win32
|
|
||||||
val.gsub!(/\G(--[-a-z0-9]+)((=\S+)|(?:\s+(?!-)\S+)+)?(\s*)/) {
|
|
||||||
_, opt, list, arg, sep = *$~
|
|
||||||
"#{opt}#{arg || list && list.sub(/^\s+/, '=').tr_s(' ', ',')}#{sep}"
|
|
||||||
}
|
|
||||||
end
|
|
||||||
val.gsub!(/--with-out-ext/, "--without-ext")
|
val.gsub!(/--with-out-ext/, "--without-ext")
|
||||||
end
|
end
|
||||||
val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump
|
val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
@echo off
|
@echo off
|
||||||
@setlocal disabledelayedexpansion
|
@setlocal disabledelayedexpansion
|
||||||
|
set witharg=
|
||||||
|
|
||||||
echo> ~tmp~.mak ####
|
echo> ~tmp~.mak ####
|
||||||
echo>> ~tmp~.mak conf = %0
|
echo>> ~tmp~.mak conf = %0
|
||||||
|
@ -9,6 +10,7 @@ echo>> ~tmp~.mak @-$(MAKE) -l$(MAKEFLAGS) -f $(@D)/setup.mak \
|
||||||
if exist pathlist.tmp del pathlist.tmp
|
if exist pathlist.tmp del pathlist.tmp
|
||||||
echo>confargs.tmp #define CONFIGURE_ARGS \
|
echo>confargs.tmp #define CONFIGURE_ARGS \
|
||||||
:loop
|
:loop
|
||||||
|
set opt=%1
|
||||||
if "%1" == "" goto :end
|
if "%1" == "" goto :end
|
||||||
if "%1" == "--prefix" goto :prefix
|
if "%1" == "--prefix" goto :prefix
|
||||||
if "%1" == "--srcdir" goto :srcdir
|
if "%1" == "--srcdir" goto :srcdir
|
||||||
|
@ -31,23 +33,20 @@ if "%1" == "--extout" goto :extout
|
||||||
if "%1" == "--path" goto :path
|
if "%1" == "--path" goto :path
|
||||||
if "%1" == "--with-baseruby" goto :baseruby
|
if "%1" == "--with-baseruby" goto :baseruby
|
||||||
if "%1" == "--with-ntver" goto :ntver
|
if "%1" == "--with-ntver" goto :ntver
|
||||||
echo %1| findstr "^--with-.*-dir$" > nul
|
if "%1" == "--without-ext" goto :witharg
|
||||||
if not errorlevel 1 goto :witharg
|
if "%1" == "--without-extensions" goto :witharg
|
||||||
echo %1| findstr "^--with-.*-include$" > nul
|
if "%opt:~0,10%" == "--without-" goto :withoutarg
|
||||||
if not errorlevel 1 goto :witharg
|
if "%opt:~0,7%" == "--with-" goto :witharg
|
||||||
echo %1| findstr "^--with-.*-lib$" > nul
|
|
||||||
if not errorlevel 1 goto :witharg
|
|
||||||
echo %1| findstr "^--with-ext$" > nul
|
|
||||||
if not errorlevel 1 goto :witharg
|
|
||||||
echo %1| findstr "^--with-extensions$" > nul
|
|
||||||
if not errorlevel 1 goto :witharg
|
|
||||||
echo %1| findstr "^--without-ext$" > nul
|
|
||||||
if not errorlevel 1 goto :witharg
|
|
||||||
echo %1| findstr "^--without-extensions$" > nul
|
|
||||||
if not errorlevel 1 goto :witharg
|
|
||||||
if "%1" == "-h" goto :help
|
if "%1" == "-h" goto :help
|
||||||
if "%1" == "--help" goto :help
|
if "%1" == "--help" goto :help
|
||||||
echo>>confargs.tmp %1 \
|
if "%opt:~0,1%" == "-" (
|
||||||
|
echo>>confargs.tmp %1 \
|
||||||
|
set witharg=
|
||||||
|
) else if "%witharg" == "" (
|
||||||
|
echo>>confargs.tmp %1 \
|
||||||
|
) else (
|
||||||
|
echo>>confargs.tmp ,%1\
|
||||||
|
)
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
:srcdir
|
:srcdir
|
||||||
|
@ -58,31 +57,31 @@ goto :loop
|
||||||
goto :loop
|
goto :loop
|
||||||
:prefix
|
:prefix
|
||||||
echo>> ~tmp~.mak "prefix=%~2" \
|
echo>> ~tmp~.mak "prefix=%~2" \
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>confargs.tmp %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
:pprefix
|
:pprefix
|
||||||
echo>> ~tmp~.mak "PROGRAM_PREFIX=%~2" \
|
echo>> ~tmp~.mak "PROGRAM_PREFIX=%~2" \
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>confargs.tmp %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
:suffix
|
:suffix
|
||||||
echo>> ~tmp~.mak "PROGRAM_SUFFIX=%~2" \
|
echo>> ~tmp~.mak "PROGRAM_SUFFIX=%~2" \
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>confargs.tmp %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
:installname
|
:installname
|
||||||
echo>> ~tmp~.mak "RUBY_INSTALL_NAME=%~2" \
|
echo>> ~tmp~.mak "RUBY_INSTALL_NAME=%~2" \
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>confargs.tmp %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
:soname
|
:soname
|
||||||
echo>> ~tmp~.mak "RUBY_SO_NAME=%~2" \
|
echo>> ~tmp~.mak "RUBY_SO_NAME=%~2" \
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>confargs.tmp %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
|
@ -134,33 +133,38 @@ goto :loop
|
||||||
goto :loop
|
goto :loop
|
||||||
:ntver
|
:ntver
|
||||||
echo>> ~tmp~.mak "NTVER=%~2" \
|
echo>> ~tmp~.mak "NTVER=%~2" \
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>confargs.tmp %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
:extout
|
:extout
|
||||||
echo>> ~tmp~.mak "EXTOUT=%~2" \
|
echo>> ~tmp~.mak "EXTOUT=%~2" \
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>confargs.tmp %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
:path
|
:path
|
||||||
echo>>pathlist.tmp %~2;\
|
echo>>pathlist.tmp %~2;\
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>confargs.tmp %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
:baseruby
|
:baseruby
|
||||||
echo>> ~tmp~.mak "BASERUBY=%~2" \
|
echo>> ~tmp~.mak "BASERUBY=%~2" \
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>confargs.tmp %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
:witharg
|
:witharg
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>confargs.tmp %1=%2\
|
||||||
|
set witharg=1
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop
|
goto :loop
|
||||||
|
:withoutarg
|
||||||
|
echo>>confargs.tmp %1 \
|
||||||
|
shift
|
||||||
|
goto :loop
|
||||||
:help
|
:help
|
||||||
echo Configuration:
|
echo Configuration:
|
||||||
echo --help display this help
|
echo --help display this help
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue