1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/win32/rtname.cmd
nobu 8d816aef2e setup.mak: -runtime-
* win32/setup.mak (-runtime-): see msvcrt from link header on mswin
  instead of running testing executable file, for cross compiling.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-12 07:12:49 +00:00

18 lines
559 B
Batchfile

@echo off
set rt=
set rtver=
set osver=
for /f "usebackq" %%I in (`dumpbin -dependents %1 ^| findstr -r -i "\<msvcr.*\.dll$"`) do set rt=%%~nI
if "%rt%" == "" (
(echo %0: %1 is not linked to msvcrt) 1>&2
exit 1
)
for %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do @call set rt=%%rt:%%i=%%i%%
if "%rt%" == "msvcrt" (
call set rtver=60
) else (
call set rtver=%%rt:msvcr=%%
call set rt=msvcr%%rtver%%
call set osver=_%%rtver%%
)
for %%I in ("PLATFORM = $(TARGET_OS)%osver%" "RT = %rt%" "RT_VER = %rtver%") do @echo %%~I