summaryrefslogtreecommitdiff
path: root/win32/configure.bat
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-14 14:10:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-14 14:10:08 +0000
commitf76f6155e11f1d9bae9a9a1f61bb8a5646b6ec2e (patch)
tree08d4051a7ab8940d1b148995321365183dfc5606 /win32/configure.bat
parentb367743e929b0bdd726736810163caf76c45a185 (diff)
* win32/Makefile.sub (MKFILES): update MKFILES if configure files get
changed. * win32/configure.bat, win32/setup.mak (configure_args): store arguments to configure files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/configure.bat')
-rwxr-xr-xwin32/configure.bat41
1 files changed, 39 insertions, 2 deletions
diff --git a/win32/configure.bat b/win32/configure.bat
index 00c9347214e..b6d5aed93be 100755
--- a/win32/configure.bat
+++ b/win32/configure.bat
@@ -6,8 +6,10 @@
echo> ~tmp~.mak ####
echo>> ~tmp~.mak conf = %0
echo>> ~tmp~.mak $(conf:\=/): nul
-echo>> ~tmp~.mak @del ~tmp~.mak
+echo>> ~tmp~.mak @del ~setup~.mak
echo>> ~tmp~.mak @-$(MAKE) -l$(MAKEFLAGS) -f $(@D)/setup.mak \
+if exist pathlist.tmp del pathlist.tmp
+echo>confargs.tmp #define CONFIGURE_ARGS \
:loop
if "%1" == "" goto :end
if "%1" == "--prefix" goto :prefix
@@ -21,55 +23,73 @@ if "%1" == "--program-name" goto :progname
if "%1" == "--enable-install-doc" goto :enable-rdoc
if "%1" == "--disable-install-doc" goto :disable-rdoc
if "%1" == "--extout" goto :extout
+if "%1" == "--path" goto :path
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
: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
+:path
+ echo>>pathlist.tmp %2;\
+ echo>>confargs.tmp %1=%2 \
shift
shift
goto :loop
@@ -84,9 +104,26 @@ goto :loop
echo Optional Package:
echo --with-static-linked-ext link external modules statically
echo --disable-install-doc do not install rdoc indexes during install
+ del *.tmp
del ~tmp~.mak
goto :exit
:end
echo>> ~tmp~.mak WIN32DIR=$(@D)
-nmake -alf ~tmp~.mak
+echo.>>confargs.tmp
+echo>confargs.c #define $ $$
+type>>confargs.c confargs.tmp
+echo>>confargs.c configure_args = CONFIGURE_ARGS
+echo>>confargs.c #undef $
+if exist pathlist.tmp echo>>confargs.c #define PATH_LIST \
+if exist pathlist.tmp type>>confargs.c pathlist.tmp
+if exist pathlist.tmp echo.>>confargs.c
+if exist pathlist.tmp echo>>confargs.c pathlist = PATH_LIST
+cl -EP confargs.c > ~setup~.mak 2>nul
+if exist pathlist.tmp echo>>~setup~.mak PATH = $(pathlist:;=/bin;)$(PATH)
+if exist pathlist.tmp echo>>~setup~.mak INCLUDE = $(pathlist:;=/include;)
+if exist pathlist.tmp echo>>~setup~.mak LIB = $(pathlist:;=/lib;)
+type>>~setup~.mak ~tmp~.mak
+del *.tmp > nul
+del ~tmp~.mak > nul
+nmake -alf ~setup~.mak
:exit