"Fossies" - the Fresh Open Source Software Archive

Member "ruby-2.7.4/win32/Makefile.sub" (7 Jul 2021, 40681 Bytes) of package /linux/misc/ruby-2.7.4.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "Makefile.sub": 2.7.3_vs_2.7.4.

    1 # -*- mode: makefile; indent-tabs-mode: t -*-
    2 
    3 SHELL = $(COMSPEC)
    4 ECHO1 = $(V:1=@:)
    5 RUNCMD = $(COMSPEC) /c
    6 MKFILES = Makefile verconf.mk
    7 NULLCMD = type nul
    8 NULL = nul
    9 CHDIR = cd
   10 PATH_SEPARATOR = ;
   11 TZ =				# skip timezone tests
   12 PWD = $(MAKEDIR)
   13 
   14 !ifndef MFLAGS
   15 MFLAGS=-l
   16 !endif
   17 
   18 !ifndef REVISION_FORCE
   19 !if "$(HAVE_BASERUBY)" == "yes"
   20 REVISION_FORCE = PHONY
   21 !endif
   22 !endif
   23 
   24 !ifndef CROSS_COMPILING
   25 CROSS_COMPILING = no
   26 !endif
   27 !ifndef LARGEFILE_SUPPORT
   28 LARGEFILE_SUPPORT = 1
   29 !endif
   30 !ifndef win_srcdir
   31 win_srcdir = $(srcdir)/win32
   32 !endif
   33 
   34 !if exist(verconf.mk)
   35 ! include verconf.mk
   36 !endif
   37 
   38 #### Start of system configuration section. ####
   39 
   40 !if defined(pathlist)
   41 PATH = $(pathlist:;=/bin;)$(PATH)
   42 INCLUDE = $(pathlist:;=/include;)
   43 LIB = $(pathlist:;=/lib;)
   44 !endif
   45 
   46 ## variables may be overridden by $(compile_dir)/Makefile
   47 !ifndef srcdir
   48 srcdir = ..
   49 !endif
   50 !ifndef RUBY_BASE_NAME
   51 RUBY_BASE_NAME = ruby
   52 !endif
   53 !ifndef RUBY_INSTALL_NAME
   54 RUBY_INSTALL_NAME = $(PROGRAM_PREFIX)$(RUBY_BASE_NAME)$(PROGRAM_SUFFIX)
   55 !endif
   56 !if !defined(RUBYW_INSTALL_NAME) || "$(RUBYW_INSTALL_NAME)" == "$(RUBY_INSTALL_NAME)"
   57 RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME:ruby=rubyw)
   58 !endif
   59 !if "$(RUBYW_INSTALL_NAME)" == "$(RUBY_INSTALL_NAME)"
   60 RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME)w
   61 !endif
   62 STUBPROGRAM = rubystub$(EXEEXT)
   63 !if !defined(icondirs) && defined(ICONDIRS)
   64 icondirs=$(ICONDIRS)
   65 !endif
   66 !if defined(icondirs)
   67 icondirs=$(icondirs:\=/)
   68 iconinc=-I$(icondirs: = -I)
   69 !endif
   70 !if !defined(MATHN)
   71 MATHN = yes
   72 !endif
   73 ###############
   74 
   75 .SUFFIXES: .def .lib
   76 
   77 !if !defined(CC)
   78 CC = cl -nologo
   79 !endif
   80 !if !defined(CPP) || "$(CPP)" == "cl"
   81 CPP = $(CC) -E
   82 !endif
   83 !if !defined(YACC)
   84 YACC = bison
   85 !endif
   86 AR = lib -nologo
   87 PURIFY =
   88 AUTOCONF = autoconf
   89 IFCHANGE = $(COMSPEC) /C $(srcdir:/=\)\win32\ifchange.bat
   90 RM = $(COMSPEC) /C $(srcdir:/=\)\win32\rm.bat
   91 RMDIR = $(COMSPEC) /C $(srcdir:/=\)\win32\rmdirs.bat
   92 RMDIRS = $(COMSPEC) /C $(srcdir:/=\)\win32\rmdirs.bat
   93 RMALL = $(COMSPEC) /C $(srcdir:/=\)\win32\rm.bat -f -r
   94 MAKEDIRS = $(COMSPEC) /E:ON /C $(srcdir:/=\)\win32\makedirs.bat
   95 CP = copy > nul
   96 MV = move > nul
   97 !if !defined(BASERUBY)
   98 BASERUBY = ruby
   99 !endif
  100 !if !defined(TEST_RUNNABLE)
  101 TEST_RUNNABLE = yes
  102 !endif
  103 
  104 !if !defined(MACHINE)
  105 MACHINE = x86
  106 !endif
  107 !if "$(MACHINE)" == "x86"
  108 !if !defined(PROCESSOR_LEVEL)
  109 PROCESSOR_LEVEL = 5
  110 !endif
  111 !if 6 < $(PROCESSOR_LEVEL)
  112 PROCESSOR_LEVEL = 6
  113 !endif
  114 !if $(MSC_VER) < 1400
  115 PROCESSOR_FLAG = -G$(PROCESSOR_LEVEL)
  116 !endif
  117 CPU = i$(PROCESSOR_LEVEL)86
  118 ARCH = i386
  119 !else
  120 CPU = $(MACHINE)
  121 ARCH = $(MACHINE)
  122 !endif
  123 !if !defined(DEBUGFLAGS)
  124 DEBUGFLAGS = -Zi
  125 !endif
  126 !if "$(RUBY_DEVEL)" == "yes"
  127 XCFLAGS = $(XCFLAGS) -DRUBY_DEVEL=1
  128 !endif
  129 !if !defined(OPTFLAGS)
  130 !if $(MSC_VER) < 1400
  131 OPTFLAGS = -O2b2xg-
  132 !else
  133 OPTFLAGS = -O2sy-
  134 !endif
  135 !endif
  136 !if !defined(PLATFORM)
  137 PLATFORM = mswin32
  138 !endif
  139 !if !defined(RT)
  140 !error RT not defined.  Retry from configure pass.
  141 !endif
  142 !ifndef NTVER
  143 NTVER = 0x0600
  144 !endif
  145 !ifdef NTVER
  146 ARCHDEFS = -D_WIN32_WINNT=$(NTVER) $(ARCHDEFS)
  147 !endif
  148 !if !defined(PLATFORM_DIR)
  149 PLATFORM_DIR = win32
  150 !endif
  151 
  152 arch = $(ARCH)-$(PLATFORM)
  153 sitearch = $(ARCH)-$(RT)
  154 !if !defined(ruby_version)
  155 ruby_version = $(MAJOR).$(MINOR).0
  156 !endif
  157 !if !defined(RUBY_VERSION_NAME)
  158 RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
  159 !endif
  160 RUBY_PROGRAM_VERSION = $(MAJOR).$(MINOR).$(TEENY)
  161 
  162 !ifndef RUBY_SO_NAME
  163 RUBY_SO_NAME = $(RT)-$(RUBY_BASE_NAME)$(ruby_version:.=)
  164 !if "$(ARCH)" != "i386"
  165 RUBY_SO_NAME = $(ARCH)-$(RUBY_SO_NAME)
  166 !endif
  167 !endif
  168 !ifndef RUBY_PLATFORM
  169 RUBY_PLATFORM = $(arch)
  170 !endif
  171 
  172 !if !defined(prefix)
  173 prefix = /usr
  174 !endif
  175 !if !defined(exec_prefix)
  176 exec_prefix = $(prefix)
  177 !endif
  178 !if !defined(libdir_basename)
  179 libdir_basename = lib
  180 !endif
  181 !if !defined(libdir)
  182 libdir = $(exec_prefix)/$(libdir_basename)
  183 !endif
  184 !if !defined(datadir)
  185 datadir = $(prefix)/share
  186 !endif
  187 !ifndef EXTOUT
  188 EXTOUT = .ext
  189 !endif
  190 !ifndef TESTUI
  191 TESTUI = console
  192 !endif
  193 !ifndef TESTS
  194 TESTS =
  195 !endif
  196 !ifndef CAPITARGET
  197 ! ifdef DOXYGEN
  198 CAPITARGET = capi
  199 ! else
  200 CAPITARGET = nodoc
  201 ! endif
  202 !endif
  203 !ifndef DOCTARGETS
  204 ! if "$(RDOCTARGET)" == "rdoc" || "$(RDOCTARGET)" == ""
  205 DOCTARGETS = $(DOCTARGETS) rdoc
  206 ! endif
  207 ! if "$(CAPITARGET)" == "capi"
  208 DOCTARGETS = $(DOCTARGETS) capi
  209 ! endif
  210 !endif
  211 !ifndef INSTALLDOC
  212 ! if "$(DOCTARGETS)" != ""
  213 INSTALLDOC = all
  214 ! else
  215 INSTALLDOC = nodoc
  216 DOCTARGETS = nodoc
  217 ! endif
  218 !endif
  219 
  220 !if !defined(OUTFLAG)
  221 OUTFLAG       = -Fe
  222 !endif
  223 !if !defined(COUTFLAG)
  224 COUTFLAG      = -Fo
  225 !endif
  226 !if !defined(CPPOUTFLAG)
  227 ! if $(MSC_VER) < 1600
  228 CPPOUTFLAG    = >
  229 ! else
  230 CPPOUTFLAG    = -Fi
  231 ! endif
  232 !endif
  233 !if !defined(CSRCFLAG)
  234 CSRCFLAG      = -Tc
  235 !endif
  236 !if !defined(RUNTIMEFLAG)
  237 RUNTIMEFLAG   = -MD
  238 !endif
  239 !if !defined(COMPILERFLAG)
  240 COMPILERFLAG  = -Zm600
  241 !endif
  242 !if !defined(WARNFLAGS)
  243 !if $(MSC_VER) >= 1400
  244 WARNFLAGS = -W2 -wd4100 -wd4127 -wd4210 -wd4214 -wd4255 -wd4574 \
  245 	    -wd4668 -wd4710 -wd4711 -wd4820 -wd4996 \
  246 	    -we4028 -we4142 -we4047
  247 !else
  248 WARNFLAGS = -W2
  249 !endif
  250 !endif
  251 WERRORFLAG = -WX
  252 !if !defined(CFLAGS_NO_ARCH)
  253 CFLAGS_NO_ARCH = $(RUNTIMEFLAG) $(DEBUGFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(COMPILERFLAG)
  254 !endif
  255 !if !defined(ARCH_FLAG)
  256 ARCH_FLAG = $(PROCESSOR_FLAG)
  257 !endif
  258 !if !defined(CFLAGS)
  259 CFLAGS = $(CFLAGS_NO_ARCH) $(ARCH_FLAG)
  260 !endif
  261 !if !defined(CXXFLAGS)
  262 CXXFLAGS = $(CFLAGS)
  263 !endif
  264 !if !defined(LDFLAGS)
  265 LDFLAGS = -incremental:no -debug -opt:ref -opt:icf
  266 !endif
  267 !if !defined(XLDFLAGS)
  268 XLDFLAGS = -stack:$(STACK)
  269 !endif
  270 !if !defined(RFLAGS)
  271 RFLAGS = -r
  272 !endif
  273 !if !defined(EXTLIBS)
  274 EXTLIBS =
  275 !endif
  276 !if !defined(EXTSOLIBS)
  277 EXTSOLIBS =
  278 !endif
  279 !if !defined(LIBS)
  280 LIBS = user32.lib advapi32.lib shell32.lib ws2_32.lib
  281 !if $(MSC_VER) >= 1400
  282 LIBS = $(LIBS) iphlpapi.lib
  283 !endif
  284 LIBS = $(LIBS) imagehlp.lib shlwapi.lib $(EXTLIBS)
  285 !endif
  286 !if !defined(MISSING)
  287 MISSING = crypt.obj ffs.obj langinfo.obj lgamma_r.obj strlcat.obj strlcpy.obj win32/win32.obj win32/file.obj setproctitle.obj
  288 !if $(RT_VER) < 120
  289 MISSING = $(MISSING) acosh.obj cbrt.obj erf.obj nan.obj tgamma.obj
  290 !endif
  291 MISSING = $(MISSING) explicit_bzero.obj
  292 !endif
  293 DLNOBJ = dln.obj
  294 
  295 !if "$(ARCH)" == "x64"
  296 COROUTINE_OBJ = coroutine/win64/Context.obj
  297 COROUTINE_SRC = $(COROUTINE_OBJ:.obj=.asm)
  298 !elseif "$(ARCH)" == "i386"
  299 COROUTINE_OBJ = coroutine/win32/Context.obj
  300 COROUTINE_SRC = $(COROUTINE_OBJ:.obj=.asm)
  301 !else
  302 COROUTINE_OBJ = coroutine/copy/Context.obj
  303 COROUTINE_SRC = $(COROUTINE_OBJ:.obj=.c)
  304 !endif
  305 COROUTINE_H = $(COROUTINE_OBJ:.obj=.h)
  306 
  307 ARFLAGS = -machine:$(MACHINE) -out:
  308 LD = $(CC)
  309 LDSHARED = $(LD) -LD
  310 XCFLAGS = -DRUBY_EXPORT $(INCFLAGS) $(XCFLAGS)
  311 !if "$(MATHN)" == "yes"
  312 XCFLAGS = $(XCFLAGS) -DCANONICALIZATION_FOR_MATHN
  313 !endif
  314 !if $(MSC_VER) >= 1400
  315 # Prevents VC++ 2005 (cl ver 14) warnings
  316 MANIFESTTOOL = mt -nologo
  317 LDSHARED_0 = @if exist $(@).manifest $(MINIRUBY) -run -e wait_writable -- -n 10 $@
  318 LDSHARED_1 = @if exist $(@).manifest $(MANIFESTTOOL) -manifest $(@).manifest -outputresource:$(@);2
  319 LDSHARED_2 = @if exist $(@).manifest @$(RM) $(@:/=\).manifest
  320 !endif
  321 CPPFLAGS = $(DEFS) $(ARCHDEFS) $(CPPFLAGS)
  322 !if "$(USE_RUBYGEMS)" == "no"
  323 CPPFLAGS = -DDISABLE_RUBYGEMS $(CPPFLAGS)
  324 !endif
  325 !ifndef MJIT_SUPPORT
  326 MJIT_SUPPORT = yes
  327 !endif
  328 !if "$(CPPOUTFLAG)" == ">"
  329 MJIT_HEADER_FLAGS =
  330 !else
  331 MJIT_HEADER_FLAGS = -P
  332 !endif
  333 MJIT_HEADER_SUFFIX =
  334 MJIT_HEADER_ARCH =
  335 MJIT_HEADER_INSTALL_DIR = include/$(RUBY_VERSION_NAME)/$(arch)
  336 MJIT_PRECOMPILED_HEADER_NAME = rb_mjit_header-$(RUBY_PROGRAM_VERSION).pch
  337 MJIT_PRECOMPILED_HEADER = $(MJIT_HEADER_INSTALL_DIR)/$(MJIT_PRECOMPILED_HEADER_NAME)
  338 !ifndef MJIT_CC
  339 MJIT_CC = $(CC)
  340 !endif
  341 !ifndef MJIT_OPTFLAGS
  342 # TODO: Use only $(OPTFLAGS) for performance. It requires to modify flags for precompiled header too.
  343 # For now, using flags used for building precompiled header to make JIT succeed.
  344 MJIT_OPTFLAGS = -DMJIT_HEADER $(CFLAGS) $(XCFLAGS) $(CPPFLAGS)
  345 !endif
  346 !ifndef MJIT_DEBUGFLAGS
  347 # TODO: Make this work... Another header for debug build needs to be installed first.
  348 MJIT_DEBUGFLAGS = $(DEBUGFLAGS)
  349 !endif
  350 !ifndef MJIT_LDSHARED
  351 MJIT_LDSHARED = $(MJIT_CC) -LD
  352 !endif
  353 
  354 POSTLINK =
  355 DLDFLAGS = $(LDFLAGS) -dll
  356 MAINLIBS = $(LIBS)
  357 SOLIBS =
  358 RCFILES = $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc
  359 !ifndef RCFLAGS
  360 !if $(MSC_VER) >= 1600
  361 RCFLAGS=-nologo
  362 !endif
  363 !endif
  364 
  365 ENABLE_SHARED = yes
  366 LIBRUBY_LDSHARED = $(LDSHARED)
  367 LIBRUBY_DLDFLAGS = $(EXTLDFLAGS) -implib:dummy.lib -def:$(RUBYDEF)
  368 
  369 EXEEXT = .exe
  370 EXECUTABLE_EXTS = ".exe",".com",".cmd",".bat"
  371 !if !defined(PROGRAM)
  372 PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
  373 !endif
  374 !if !defined(WPROGRAM) && defined(RUBYW_INSTALL_NAME)
  375 WPROGRAM=$(RUBYW_INSTALL_NAME)$(EXEEXT)
  376 !endif
  377 RUBYDEF = $(RUBY_SO_NAME).def
  378 !if "$(CROSS_COMPILING)" == "yes"
  379 MINIRUBY = $(RUBY) -I$(MAKEDIR) -r$(arch)-fake
  380 RUNRUBY = $(MINIRUBY)
  381 !else
  382 MINIRUBY = .\miniruby$(EXEEXT) -I$(srcdir)/lib -I.
  383 RUNRUBY = .\$(PROGRAM) -I$(srcdir)/lib -I"$(EXTOUT)/$(arch)" -I.
  384 !endif
  385 MINIRUBY = $(MINIRUBY) $(MINIRUBYOPT)
  386 RUNRUBY = $(RUNRUBY) "$(srcdir)/tool/runruby.rb" --extout="$(EXTOUT)" $(RUNRUBYOPT) -- $(RUN_OPTS)
  387 !if "$(CROSS_COMPILING)" == "yes"
  388 XRUBY = $(MINIRUBY)
  389 BOOTSTRAPRUBY = $(BASERUBY)
  390 !else
  391 BOOTSTRAPRUBY = $(MINIRUBY)
  392 XRUBY = $(RUNRUBY)
  393 !endif
  394 BTESTRUBY = $(MINIRUBY)
  395 !ifndef RUBY
  396 RUBY = ruby
  397 !endif
  398 
  399 DTRACE_EXT = dmyh
  400 
  401 !if !defined(STACK)
  402 !if "$(ARCH)" == "x64"
  403 STACK = 0x400000
  404 !else
  405 STACK = 0x200000
  406 !endif
  407 !if defined(STACK_COMMIT)
  408 STACK = $(STACK),$(STACK_COMMIT)
  409 !endif
  410 !endif
  411 ORGLIBPATH = $(LIB)
  412 
  413 #### End of system configuration section. ####
  414 
  415 LIBRUBY_A     = $(RUBY_SO_NAME)-static.lib
  416 LIBRUBY_SO    = $(RUBY_SO_NAME).dll
  417 LIBRUBY_SONAME= $(RUBY_SO_NAME).dll
  418 LIBRUBY       = $(RUBY_SO_NAME).lib
  419 LIBRUBYARG    = $(LIBRUBY)
  420 LIBRUBYARG_SHARED = $(LIBRUBY)
  421 LIBRUBY_RELATIVE = yes
  422 
  423 THREAD_MODEL  = win32
  424 
  425 !if "$(CROSS_COMPILING)" == "yes"
  426 PREP          = $(arch)-fake.rb
  427 !else
  428 PREP          = miniruby$(EXEEXT)
  429 !endif
  430 
  431 !if !defined(EXTSTATIC)
  432 EXTSTATIC     =
  433 !endif
  434 
  435 OBJEXT = obj
  436 ASMEXT = asm
  437 
  438 INSTALLED_LIST= .installed.list
  439 
  440 SRC_FILE = $(<:\=/)
  441 OS_SRC_FILE = $(<:/=\)
  442 DEST_FILE = $(@:\=/)
  443 OS_DEST_FILE = $(@:/=\)
  444 
  445 !if !defined(WINMAINOBJ)
  446 WINMAINOBJ    = winmain.$(OBJEXT)
  447 !endif
  448 MAINSRC       = $(MAINOBJ:.obj=.c)
  449 ARCHMINIOBJS  = dmydln.$(OBJEXT) miniruby.res
  450 LIBOBJS       = $(MISSING) $(LIBOBJS)
  451 
  452 !ifndef COMMON_LIBS
  453 COMMON_LIBS  = m
  454 !endif
  455 !ifndef COMMON_MACROS
  456 COMMON_MACROS = WIN32_LEAN_AND_MEAN WIN32
  457 !endif
  458 !ifndef COMMON_HEADERS
  459 COMMON_HEADERS = winsock2.h ws2tcpip.h windows.h
  460 !endif
  461 
  462 !if "$(EXTSTATIC)" == "static"
  463 ENCOBJS = enc/encinit.$(OBJEXT) enc/libenc.lib enc/libtrans.lib
  464 EXTOBJS = ext/extinit.$(OBJEXT)
  465 ! if !defined(ENCSTATIC)
  466 ENCSTATIC = static
  467 ! endif
  468 !else
  469 ENCOBJS = dmyenc.$(OBJEXT)
  470 EXTOBJS = dmyext.$(OBJEXT)
  471 !endif
  472 
  473 arch_hdrdir = $(EXTOUT)/include/$(arch)
  474 top_srcdir = $(srcdir)
  475 hdrdir = $(srcdir)/include
  476 VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/missing;$(win_srcdir)
  477 
  478 !ifndef GIT
  479 GIT = git
  480 !endif
  481 !if "$(HAVE_GIT)" == "yes" || "$(HAVE_GIT)" == "no"
  482 !else if "$(GIT)" == ""
  483 HAVE_GIT = no
  484 !else if [for %I in ($(GIT)) do @if not "%~xI" == "" exit 1]
  485 ! if [for %I in ($(GIT)) do @if not "%~$$PATH:I" == "" exit 1]
  486 HAVE_GIT = yes
  487 ! else
  488 HAVE_GIT = no
  489 ! endif
  490 !else
  491 ! if [for %x in (%PATHEXT:;= %) do @for %I in ($(GIT)%x) do @if not "%~$$PATH:I" == "" exit 1]
  492 HAVE_GIT = yes
  493 ! else
  494 HAVE_GIT = no
  495 ! endif
  496 !endif
  497 
  498 !if defined(VCS)
  499 !else if exist($(srcdir)/.git)
  500 VCS = $(GIT)
  501 VCSUP = $(VCS) pull $(GITPULLOPTIONS)
  502 !else
  503 VCSUP = rem
  504 !endif
  505 ruby_pc = $(RUBY_BASE_NAME)-$(MAJOR).$(MINOR).pc
  506 
  507 MESSAGE_BEGIN = @(for %I in (
  508 MESSAGE_END = ) do @echo.%~I)
  509 ECHO_BEGIN = @echo.
  510 ECHO_END =
  511 
  512 all: $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub $(srcdir)/common.mk
  513 prog: config
  514 
  515 ruby: $(PROGRAM)
  516 rubyw: $(WPROGRAM)
  517 stub: $(STUBPROGRAM)
  518 rubystub: $(STUBPROGRAM)
  519 
  520 !if !exist(enc/trans/newline.c) && exist($(srcdir)/enc/trans/newline.c)
  521 NEWLINE_C = $(srcdir)/enc/trans/newline.c
  522 !else
  523 NEWLINE_C = enc/trans/newline.c
  524 !endif
  525 !if !exist(miniprelude.c) && exist($(srcdir)/miniprelude.c)
  526 MINIPRELUDE_C = $(srcdir)/miniprelude.c
  527 !else
  528 MINIPRELUDE_C = miniprelude.c
  529 !endif
  530 !if !exist(golf_prelude.c) && exist($(srcdir)/golf_prelude.c)
  531 GOLF_PRELUDE_C = $(srcdir)/golf_prelude.c
  532 !else
  533 GOLF_PRELUDE_C = golf_prelude.c
  534 !endif
  535 RBCONFIG      = ./.rbconfig.time
  536 
  537 !include $(srcdir)/common.mk
  538 
  539 !ifdef SCRIPTPROGRAMS
  540 !else if [echo>scriptbin.mk SCRIPTPROGRAMS = \]
  541 !else if [for %I in ($(srcdir:/=\)\bin\*) do @echo>>scriptbin.mk %~nI.exe \]
  542 !else if [echo.>>scriptbin.mk]
  543 !else if [echo.>>scriptbin.mk]
  544 !endif
  545 !if [for %I in ($(srcdir:/=\)\bin\*) do @for %J in (\
  546 "%~nI.exe: $$(srcdir)/bin/%~nI" \
  547 "	$$(ECHO) generating $$(@)" \
  548 "	$$(Q) copy /y /b $$(STUBPROGRAM) $$(@) > nul" \
  549 "	$$(Q) echo.>>$$(@)" \
  550 "	$$(Q) echo.>>$$(@)" \
  551 "	$$(Q) copy /b $$(@)+$$(srcdir:/=\)\bin\%~nI $$(@) > nul" \
  552 "" \
  553 ) do @echo.%~J>>scriptbin.mk]
  554 !else
  555 ! include scriptbin.mk
  556 ! if [del scriptbin.mk > nul]
  557 ! endif
  558 !endif
  559 
  560 scriptbin: $(SCRIPTPROGRAMS)
  561 
  562 $(SCRIPTPROGRAMS): $(STUBPROGRAM)
  563 
  564 update-src::
  565 	@cd "$(srcdir:/=\)" && set LC_TIME=C && $(VCSUP)
  566 
  567 .PHONY: reconfig
  568 reconfig $(MKFILES): $(srcdir)/common.mk $(srcdir)/version.h \
  569 	    $(win_srcdir)/Makefile.sub $(win_srcdir)/configure.bat \
  570 	    $(win_srcdir)/setup.mak $(win_srcdir)/enc-setup.mak \
  571 	    $(srcdir)/enc/Makefile.in
  572 	$(COMSPEC) /C $(win_srcdir:/=\)\configure.bat $(configure_args)
  573 	@fc Makefile Makefile.old > nul && echo Makefile unchanged || \
  574 	(echo $(MKFILES) was updated, re-run $(MAKE). & exit 1)
  575 
  576 RUBY_CONFIG_H = $(arch_hdrdir)/ruby/config.h
  577 CONFIG_H = ./.config.h.time
  578 
  579 config: config.status
  580 
  581 config.status: $(CONFIG_H)
  582 
  583 BANG = !
  584 
  585 !if !exist(config.status)
  586 !else if [for /f "skip=1 delims=, tokens=2-3" %I in (config.status) do @ \
  587     if "%I" == "@RUBY_SO_NAME@" ( \
  588 	if not "%J" == "$(RUBY_SO_NAME)" exit 1 \
  589     ) else if "%I" == "@target_alias@" ( \
  590 	if not "%J" == "$(ARCH)-$(PLATFORM)" exit 1 \
  591     ) \
  592 ]
  593 config.status: nul
  594 !endif
  595 
  596 guard = INCLUDE_RUBY_CONFIG_H
  597 
  598 $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
  599 	@echo Creating config.h
  600 !if !exist("$(arch_hdrdir)")
  601 	@md $(arch_hdrdir:/=\)
  602 !endif
  603 !if !exist("$(arch_hdrdir)/ruby")
  604 	@md $(arch_hdrdir:/=\)\ruby
  605 !endif
  606 	@$(IFCHANGE) "--timestamp=$(@:/=\)" $(RUBY_CONFIG_H:/=\) <<
  607 #ifndef $(guard)
  608 #define $(guard) 1
  609 #if _MSC_VER != $(MSC_VER)
  610 #error MSC version unmatch: _MSC_VER: $(MSC_VER) is expected.
  611 #endif
  612 #define RUBY_MSVCRT_VERSION $(RT_VER)
  613 #define STDC_HEADERS 1
  614 #define HAVE_SYS_TYPES_H 1
  615 #define HAVE_SYS_STAT_H 1
  616 !if $(MSC_VER) >= 1800
  617 #define HAVE_STDBOOL_H 1
  618 !endif
  619 #define HAVE_STDLIB_H 1
  620 #define HAVE_STDDEF_H 1
  621 #define HAVE_STRING_H 1
  622 #define HAVE_MEMORY_H 1
  623 !if $(MSC_VER) >= 1400
  624 #define HAVE_LONG_LONG 1
  625 !else
  626 #define ULL_TO_DOUBLE(n) ((double)(unsigned long)((n)>>32) * (1I64 << 32) + (unsigned long)(n))
  627 !endif
  628 #define HAVE_OFF_T 1
  629 #define SIZEOF_INT 4
  630 #define SIZEOF_SHORT 2
  631 #define SIZEOF_LONG 4
  632 !if $(MSC_VER) >= 1400
  633 #define SIZEOF_LONG_LONG 8
  634 !else
  635 #define SIZEOF_LONG_LONG 0
  636 !endif
  637 #define SIZEOF___INT64 8
  638 #define _INTEGRAL_MAX_BITS 64
  639 !if $(LARGEFILE_SUPPORT)
  640 #define SIZEOF_OFF_T 8
  641 !else
  642 #define SIZEOF_OFF_T 4
  643 !endif
  644 !if "$(ARCH)" == "x64"
  645 #define SIZEOF_VOIDP 8
  646 !else
  647 #define SIZEOF_VOIDP 4
  648 !endif
  649 #define SIZEOF_FLOAT 4
  650 #define SIZEOF_DOUBLE 8
  651 #define SIGNEDNESS_OF_TIME_T -1
  652 #define NEGATIVE_TIME_T 1
  653 !if $(RT_VER) >= 80
  654 #define SIZEOF_TIME_T 8
  655 #define TIMET2NUM(v) LL2NUM(v)
  656 #define NUM2TIMET(v) NUM2LL(v)
  657 !else
  658 #define SIZEOF_TIME_T 4
  659 #define TIMET2NUM(v) LONG2NUM(v)
  660 #define NUM2TIMET(v) NUM2LONG(v)
  661 !endif
  662 #define CLOCKID2NUM(v) INT2NUM(v)
  663 #define NUM2CLOCKID(v) NUM2INT(v)
  664 #define SIZEOF_CLOCK_T 4
  665 #define SIZEOF_RLIM_T 0
  666 !if "$(ARCH)" == "x64"
  667 #define SIZEOF_SIZE_T 8
  668 #define SIZEOF_PTRDIFF_T 8
  669 #define SIZEOF_INTPTR_T 8
  670 #define SIZEOF_UINTPTR_T 8
  671 !else
  672 #define SIZEOF_SIZE_T 4
  673 #define SIZEOF_PTRDIFF_T 4
  674 #define SIZEOF_INTPTR_T 4
  675 #define SIZEOF_UINTPTR_T 4
  676 !endif
  677 !if $(MSC_VER) < 1400
  678 #define SIZE_MAX UINT_MAX
  679 !endif
  680 #define HAVE_PROTOTYPES 1
  681 #define TOKEN_PASTE(x,y) x##y
  682 #define HAVE_STDARG_PROTOTYPES 1
  683 !if $(MSC_VER) >= 1800
  684 #define HAVE_VA_COPY 1
  685 !else
  686 #define HAVE_VA_COPY_VIA_STRUCT_ASSIGNMENT 1
  687 !endif
  688 !if $(MSC_VER) > 1100
  689 #define NORETURN(x) __declspec(noreturn) x
  690 !endif
  691 !if $(MSC_VER) >= 1300
  692 #define DEPRECATED(x) __declspec(deprecated) x
  693 #define DEPRECATED_TYPE(mesg, x) __declspec(deprecated mesg) x
  694 #define RUBY_CXX_DEPRECATED(mesg) __declspec(deprecated(mesg))
  695 #define NOINLINE(x) __declspec(noinline) x
  696 !endif
  697 #define ALWAYS_INLINE(x) __forceinline x
  698 #define WARN_UNUSED_RESULT(x) x
  699 #define MAYBE_UNUSED(x) x
  700 #define UNREACHABLE __assume(0)
  701 #define ASSUME(x) __assume(!!(x))
  702 #define FUNC_STDCALL(x) __stdcall x
  703 #define FUNC_CDECL(x) __cdecl x
  704 #define FUNC_FASTCALL(x) __fastcall x
  705 !if $(MSC_VER) >= 1500
  706 #define RUBY_FUNCTION_NAME_STRING __FUNCTION__
  707 #define PACKED_STRUCT(x) __pragma(pack(push, 1)) x __pragma(pack(pop))
  708 !else
  709 #define PACKED_STRUCT(x) x
  710 !endif
  711 !if "$(ARCH)" == "x86" || "$(ARCH)" == "x64"
  712 #define PACKED_STRUCT_UNALIGNED(x) PACKED_STRUCT(x)
  713 !else
  714 #define PACKED_STRUCT_UNALIGNED(x) x
  715 !endif
  716 #define RUBY_EXTERN extern __declspec(dllimport)
  717 #define RUBY_ALIGNAS(n) __declspec(align(n))
  718 #define RUBY_ALIGNOF __alignof
  719 #define HAVE_DECL_SYS_NERR 1
  720 #define HAVE_LIMITS_H 1
  721 #define HAVE_FCNTL_H 1
  722 #define HAVE_SYS_UTIME_H 1
  723 #define HAVE_FLOAT_H 1
  724 #define HAVE_TIME_H 1
  725 #define rb_pid_t int
  726 #define rb_gid_t int
  727 #define rb_uid_t int
  728 #define HAVE_STRUCT_STAT_ST_RDEV 1
  729 #define HAVE_STRUCT_TIMEVAL 1
  730 !if $(MSC_VER) >= 1900
  731 #define HAVE_STRUCT_TIMESPEC
  732 !endif
  733 !if $(MSC_VER) >= 1600
  734 #define HAVE_STDINT_H 1
  735 !else
  736 #define int8_t signed char
  737 #define uint8_t unsigned char
  738 #define int16_t short
  739 #define uint16_t unsigned short
  740 #define int32_t int
  741 #define uint32_t unsigned int
  742 #define int64_t __int64
  743 #define uint64_t unsigned __int64
  744 #define INT8_MIN _I8_MIN
  745 #define INT8_MAX _I8_MAX
  746 #define UINT8_MAX _UI8_MAX
  747 #define INT16_MIN _I16_MIN
  748 #define INT16_MAX _I16_MAX
  749 #define UINT16_MAX _UI16_MAX
  750 #define INT32_MIN _I32_MIN
  751 #define INT32_MAX _I32_MAX
  752 #define UINT32_MAX _UI32_MAX
  753 #define INT64_MIN _I64_MIN
  754 #define INT64_MAX _I64_MAX
  755 #define UINT64_MAX _UI64_MAX
  756 !endif
  757 #define HAVE_INT8_T 1
  758 #define HAVE_UINT8_T 1
  759 #define SIZEOF_INT8_T 1
  760 #define SIZEOF_UINT8_T 1
  761 #define HAVE_INT16_T 1
  762 #define HAVE_UINT16_T 1
  763 #define SIZEOF_INT16_T 2
  764 #define SIZEOF_UINT16_T 2
  765 #define HAVE_INT32_T 1
  766 #define HAVE_UINT32_T 1
  767 #define SIZEOF_INT32_T 4
  768 #define SIZEOF_UINT32_T 4
  769 #define HAVE_INT64_T 1
  770 #define HAVE_UINT64_T 1
  771 #define SIZEOF_INT64_T 8
  772 #define SIZEOF_UINT64_T 8
  773 #define HAVE_INTPTR_T 1
  774 #define HAVE_UINTPTR_T 1
  775 #define HAVE_SSIZE_T 1
  776 !if "$(ARCH)" == "x64"
  777 #define ssize_t __int64
  778 #define PRI_PTR_PREFIX "I64"
  779 !else
  780 #define ssize_t int
  781 #define PRI_PTR_PREFIX PRI_INT_PREFIX
  782 !endif
  783 #define PRI_LL_PREFIX "I64"
  784 #define PRI_PIDT_PREFIX PRI_INT_PREFIX
  785 #define GETGROUPS_T int
  786 #define RETSIGTYPE void
  787 #define TYPEOF_TIMEVAL_TV_SEC long
  788 !if $(RT_VER) >= 120
  789 #define HAVE_ACOSH 1
  790 #define HAVE_ASINH 1
  791 #define HAVE_ATANH 1
  792 #define HAVE_CBRT 1
  793 #define HAVE_LOG2 1
  794 #define log2(x) log2(x)
  795 #define HAVE_ERF 1
  796 #define HAVE_ERFC 1
  797 #define HAVE_ROUND 1
  798 #define HAVE_TGAMMA 1
  799 #define HAVE_NEXTAFTER 1
  800 !endif
  801 #define HAVE_ALLOCA 1
  802 #define HAVE_DUP2 1
  803 #define HAVE_MEMCMP 1
  804 #define HAVE_MEMMOVE 1
  805 #define HAVE_MKDIR 1
  806 #define HAVE_CLOCK_GETTIME 1
  807 #define HAVE_CLOCK_GETRES 1
  808 #define HAVE_GETTIMEOFDAY 1
  809 #define HAVE_SPAWNV 1
  810 #define HAVE_STRCASECMP 1
  811 #define HAVE_STRNCASECMP 1
  812 #define HAVE_STRERROR 1
  813 #define HAVE_STRFTIME 1
  814 #define HAVE_STRCHR 1
  815 #define HAVE_STRSTR 1
  816 #define HAVE_FLOCK 1
  817 #define HAVE_ISNAN 1
  818 #define HAVE_FINITE 1
  819 !if $(RT_VER) >= 120
  820 #define HAVE_NAN 1
  821 !endif
  822 #define HAVE_HYPOT 1
  823 #define HAVE_FMOD 1
  824 #define HAVE_FREXP 1
  825 #define HAVE_MODF 1
  826 #define HAVE_WAITPID 1
  827 #define HAVE_FSYNC 1
  828 #define HAVE_GETCWD 1
  829 #define HAVE_TRUNCATE 1
  830 #define HAVE_FTRUNCATE 1
  831 #define HAVE_LSTAT 1
  832 #define HAVE_TIMES 1
  833 #define HAVE_FCNTL 1
  834 #define HAVE_LINK 1
  835 #define HAVE_READLINK 1
  836 #define HAVE_SYMLINK 1
  837 #define HAVE_LCHOWN 1
  838 #define HAVE__SETJMP 1
  839 #define HAVE_TELLDIR 1
  840 #define HAVE_SEEKDIR 1
  841 #define HAVE_MKTIME 1
  842 #define HAVE_COSH 1
  843 #define HAVE_SINH 1
  844 #define HAVE_TANH 1
  845 #define HAVE_SIGNBIT 1
  846 #define HAVE_TZNAME 1
  847 #define HAVE_DAYLIGHT 1
  848 #define HAVE_GMTIME_R 1
  849 !if $(RT_VER) > 120
  850 #define HAVE_QSORT_S
  851 !endif
  852 #define HAVE_TYPE_NET_LUID 1
  853 #define SETPGRP_VOID 1
  854 #define RSHIFT(x,y) ((x)>>(int)y)
  855 #define HAVE_RB_FD_INIT 1
  856 #define RUBY_SETJMP(env) _setjmp(env)
  857 #define RUBY_LONGJMP(env,val) longjmp(env,val)
  858 #define RUBY_JMP_BUF jmp_buf
  859 #define inline __inline
  860 #ifndef __cplusplus
  861 !if $(MSC_VER) >= 1800
  862 #define restrict __restrict
  863 !else
  864 #define restrict /* not supported */
  865 !endif
  866 #endif
  867 #define NEED_IO_SEEK_BETWEEN_RW 1
  868 !if "$(MACHINE)" == "x86" || "$(ARCH)" == "x64"
  869 #define STACK_GROW_DIRECTION -1
  870 !endif
  871 #define COROUTINE_H "$(COROUTINE_H)"
  872 #define DEFAULT_KCODE KCODE_NONE
  873 #define LOAD_RELATIVE 1
  874 #define DLEXT ".so"
  875 !if "$(libdir_basename)" != "lib"
  876 #define LIBDIR_BASENAME "$(libdir_basename)"
  877 !endif
  878 !if "$(EXTSTATIC)" == "static"
  879 #define EXTSTATIC 1
  880 !endif
  881 #define EXECUTABLE_EXTS $(EXECUTABLE_EXTS)
  882 #define RUBY_COREDLL "$(RT)"
  883 #define RUBY_PLATFORM "$(arch)"
  884 #define RUBY_SITEARCH "$(sitearch)"
  885 !if "$(MJIT_SUPPORT)" == "yes"
  886 #define USE_MJIT 1
  887 !else
  888 #define USE_MJIT 0
  889 !endif
  890 #endif /* $(guard) */
  891 <<
  892 
  893 #!if exist($(RUBY_CONFIG_H))
  894 #! if exist(config_h.bak)
  895 #	@del $(RUBY_CONFIG_H:.h=_h).bak
  896 #! endif
  897 #	@copy $(RUBY_CONFIG_H) $(RUBY_CONFIG_H:.h=_h).bak
  898 #!endif
  899 #!if exist($(RUBY_CONFIG_H))
  900 #	@echo NMAKE will abort if config.h is changed, then restart NMAKE.
  901 #	@fc.exe $(RUBY_CONFIG_H) $(RUBY_CONFIG_H:.h=_h).bak > nul
  902 #	@echo $(RUBY_CONFIG_H) unchanged.
  903 #	@del $(RUBY_CONFIG_H)
  904 #	@ren $(RUBY_CONFIG_H:.h=_h).bak $(RUBY_CONFIG_H)
  905 #!endif
  906 
  907 EXECUTABLE_EXTS = $(EXECUTABLE_EXTS:"=) # "
  908 EXECUTABLE_EXTS = $(EXECUTABLE_EXTS:,= )
  909 
  910 config.status: $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub $(srcdir)/common.mk
  911 	@echo Creating $@
  912 	@exit <<$@
  913 # Generated automatically by Makefile.sub.
  914 s,@SHELL@,$$(COMSPEC),;t t
  915 s,@BUILD_FILE_SEPARATOR@,\,;t t
  916 s,@PATH_SEPARATOR@,;,;t t
  917 s,@CFLAGS@,$(CFLAGS),;t t
  918 s,@WERRORFLAG@,$(WERRORFLAG),;t t
  919 s,@DEFS@,$(DEFS),;t t
  920 s,@CPPFLAGS@,$(CPPFLAGS),;t t
  921 s,@CXXFLAGS@,$(CXXFLAGS),;t t
  922 s,@FFLAGS@,$(FFLAGS),;t t
  923 s,@LDFLAGS@,$(LDFLAGS),;t t
  924 s,@LIBS@,user32.lib,;t t
  925 s,@MAINLIBS@,$(MAINLIBS),;t t
  926 s,@exec_prefix@,$${prefix},;t t
  927 s,@prefix@,$(prefix),;t t
  928 s,@program_transform_name@,s,.*,$(PROGRAM_PREFIX)&$(PROGRAM_SUFFIX),,;t t
  929 s,@bindir@,$${exec_prefix}/bin,;t t
  930 s,@sbindir@,$${exec_prefix}/sbin,;t t
  931 s,@libexecdir@,$${exec_prefix}/libexec,;t t
  932 s,@datadir@,$${prefix}/share,;t t
  933 s,@sysconfdir@,,;t t
  934 s,@sharedstatedir@,$${prefix}/com,;t t
  935 s,@localstatedir@,$${prefix}/var,;t t
  936 s,@libdir@,$${exec_prefix}/$(libdir_basename),;t t
  937 s,@includedir@,$${prefix}/include,;t t
  938 s,@oldincludedir@,/usr/include,;t t
  939 s,@infodir@,$${datadir}/info,;t t
  940 s,@mandir@,$${datadir}/man,;t t
  941 s,@ridir@,$${datadir}/ri,;t t
  942 s,@docdir@,$${datadir}/doc/$${RUBY_BASE_NAME},;t t
  943 s,@build@,$(CPU)-pc-$(PLATFORM),;t t
  944 s,@build_alias@,$(CPU)-$(PLATFORM),;t t
  945 s,@build_cpu@,$(CPU),;t t
  946 s,@build_vendor@,pc,;t t
  947 s,@build_os@,$(PLATFORM),;t t
  948 s,@host@,$(CPU)-pc-$(PLATFORM),;t t
  949 s,@host_alias@,$(CPU)-$(PLATFORM),;t t
  950 s,@host_cpu@,$(CPU),;t t
  951 s,@host_vendor@,pc,;t t
  952 s,@host_os@,$(PLATFORM),;t t
  953 s,@target@,$(ARCH)-pc-$(PLATFORM),;t t
  954 s,@target_alias@,$(ARCH)-$(PLATFORM),;t t
  955 s,@target_cpu@,$(ARCH),;t t
  956 s,@target_vendor@,pc,;t t
  957 s,@target_os@,$(PLATFORM),;t t
  958 s,@NULLCMD@,:,;t t
  959 s,@CC@,$(CC),;t t
  960 s,@CPP@,$(CPP),;t t
  961 s,@CXX@,$$(CC),;t t
  962 s,@LD@,$$(CC),;t t
  963 s,@YACC@,$(YACC),;t t
  964 s,@RANLIB@,,;t t
  965 s,@AR@,$(AR),;t t
  966 s,@ARFLAGS@,$(ARFLAGS),;t t
  967 s,@LN_S@,$(LN_S),;t t
  968 s,@SET_MAKE@,MFLAGS = -$$(MAKEFLAGS),;t t
  969 s,@RM@,$$(COMSPEC) /C $$(top_srcdir:/=\)\win32\rm.bat,;t t
  970 s,@RMDIR@,$$(COMSPEC) /C $$(top_srcdir:/=\)\win32\rmdirs.bat,:t t
  971 s,@RMDIRS@,$$(COMSPEC) /C $$(top_srcdir:/=\)\win32\rmdirs.bat,;t t
  972 s,@RMALL@,$$(COMSPEC) /C $$(top_srcdir:/=\)\win32\rm.bat -f -r,:t t
  973 s,@MAKEDIRS@,$$(COMSPEC) /E:ON /C $$(top_srcdir:/=\)\win32\makedirs.bat,;t t
  974 s,@LIBOBJS@,$(LIBOBJS),;t t
  975 s,@ALLOCA@,$(ALLOCA),;t t
  976 s,@DEFAULT_KCODE@,$(DEFAULT_KCODE),;t t
  977 s,@EXEEXT@,.exe,;t t
  978 s,@EXECUTABLE_EXTS@,$(EXECUTABLE_EXTS),;t t
  979 s,@OBJEXT@,$(OBJEXT),;t t
  980 s,@ASMEXT@,$(ASMEXT),;t t
  981 s,@XCFLAGS@,$(XCFLAGS),;t t
  982 s,@XLDFLAGS@,$(XLDFLAGS),;t t
  983 s,@DLDFLAGS@,$(DLDFLAGS) $$(LIBPATH),;t t
  984 s,@EXTDLDFLAGS@,$(EXTDLDFLAGS),;t t
  985 s,@ARCH_FLAG@,$(ARCH_FLAG),;t t
  986 s,@STATIC@,$(STATIC),;t t
  987 s,@CCDLFLAGS@,,;t t
  988 s,@LDSHARED@,$(LDSHARED),;t t
  989 s,@SOEXT@,dll,;t t
  990 s,@DLEXT@,so,;t t
  991 s,@LIBEXT@,lib,;t t
  992 s,@STRIP@,$(STRIP),;t t
  993 s,@EXTSTATIC@,$(EXTSTATIC),;t t
  994 s,@setup@,Setup,;t t
  995 s,@MINIRUBY@,$(MINIRUBY),;t t
  996 s,@PREP@,miniruby$(EXEEXT),;t t
  997 s,@RUNRUBY@,$(RUNRUBY),;t t
  998 s,@EXTOUT@,$(EXTOUT),;t t
  999 s,@ARCHFILE@,,;t t
 1000 s,@RDOCTARGET@,,;t t
 1001 s,@LIBRUBY_LDSHARED@,$(LIBRUBY_LDSHARED),;t t
 1002 s,@LIBRUBY_DLDFLAGS@,$(LIBRUBY_DLDFLAGS),;t t
 1003 s,@RUBY_BASE_NAME@,$(RUBY_BASE_NAME),;t t
 1004 s,@RUBY_INSTALL_NAME@,$(RUBY_INSTALL_NAME),;t t
 1005 s,@rubyw_install_name@,$(RUBYW_INSTALL_NAME),;t t
 1006 s,@RUBYW_INSTALL_NAME@,$(RUBYW_INSTALL_NAME),;t t
 1007 s,@RUBY_SO_NAME@,$(RUBY_SO_NAME),;t t
 1008 s,@LIBRUBY_A@,$$(RUBY_SO_NAME)-static.lib,;t t
 1009 s,@LIBRUBY_SO@,$$(RUBY_SO_NAME).dll,;t t
 1010 s,@LIBRUBY_ALIASES@,$(LIBRUBY_ALIASES),;t t
 1011 s,@LIBRUBY@,$$(RUBY_SO_NAME).lib,;t t
 1012 s,@LIBRUBYARG@,$$(LIBRUBYARG_SHARED),;t t
 1013 s,@LIBRUBYARG_STATIC@,$$(LIBRUBY_A) $$(MAINLIBS),;t t
 1014 s,@LIBRUBYARG_SHARED@,$$(LIBRUBY),;t t
 1015 s,@SOLIBS@,$(SOLIBS),;t t
 1016 s,@DLDLIBS@,$(DLDLIBS),;t t
 1017 s,@ENABLE_SHARED@,yes,;t t
 1018 s,@BASERUBY@,$(BASERUBY),;t t
 1019 s,@OUTFLAG@,$(OUTFLAG),;t t
 1020 s,@COUTFLAG@,$(COUTFLAG),;t t
 1021 s,@CSRCFLAG@,$(CSRCFLAG),;t t
 1022 s,@CPPOUTFILE@,-P,;t t
 1023 s,@PRELOADENV@,,;t t
 1024 s,@LIBPATHENV@,PATH,;t t
 1025 s,@LIBPATHFLAG@, -libpath:%s,;t t
 1026 s,@RPATHFLAG@,,;t t
 1027 s,@LIBARG@,%s.lib,;t t
 1028 s,@LINK_SO@,$$(LDSHARED) -Fe$$(@) $$(OBJS) $$(LIBS) $$(LOCAL_LIBS) -link $$(DLDFLAGS) -implib:$$(*F:.so=)-$$(arch).lib -pdb:$$(*F:.so=)-$$(arch).pdb -def:$$(DEFFILE),;t t
 1029 !if $(MSC_VER) >= 1400
 1030 s,@LINK_SO@,@if exist $$(@).manifest $$(RUBY) -run -e wait_writable -- -n 10 $$(@),;t t
 1031 s,@LINK_SO@,@if exist $$(@).manifest $(MANIFESTTOOL) -manifest $$(@).manifest -outputresource:$$(@);2,;t t
 1032 s,@LINK_SO@,@if exist $$(@).manifest $$(RM) $$(@:/=\).manifest,;t t
 1033 !endif
 1034 s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c $$(CSRCFLAG)$$(<:\=/),;t t
 1035 s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tp$$(<:\=/),;t t
 1036 s,@ASSEMBLE_C@,$$(CC) $$(CFLAGS) $$(CPPFLAGS) -Fa$$(@) -c $$(CSRCFLAG)$$(<:\=/),;t t
 1037 s,@ASSEMBLE_CXX@,$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) -Fa$$(@) -c -Tp$$(<:\=/),;t t
 1038 s,@COMPILE_RULES@,{$$(*VPATH*)}.%s.%s: .%s.%s:,;t t
 1039 s,@CXX_EXT@,cpp,;t t
 1040 s,@RULE_SUBST@,{.;$$(VPATH)}%s,;t t
 1041 s,@TRY_LINK@,$$(CC) -Feconftest $$(INCFLAGS) -I$$(hdrdir) $$(CPPFLAGS) $$(CFLAGS) $$(src) $$(LOCAL_LIBS) $$(LIBS) -link $$(LDFLAGS) $$(LIBPATH) $$(XLDFLAGS),;t t
 1042 s,@COMMON_LIBS@,$(COMMON_LIBS),;t t
 1043 s,@COMMON_MACROS@,$(COMMON_MACROS),;t t
 1044 s,@COMMON_HEADERS@,$(COMMON_HEADERS),;t t
 1045 s,@cleanobjs@,$$*.exp $$*.lib $$*.pdb,;t t
 1046 s,@DISTCLEANFILES@,vc*.pdb,;t t
 1047 s,@EXPORT_PREFIX@, ,;t t
 1048 s,@archlibdir@,$${libdir}/$${arch},;t t
 1049 s,@sitearchlibdir@,$${libdir}/$${sitearch},;t t
 1050 s,@archincludedir@,$${includedir}/$${arch},;t t
 1051 s,@sitearchincludedir@,$${includedir}/$${sitearch},;t t
 1052 s,@arch@,$(ARCH)-$(PLATFORM),;t t
 1053 s,@sitearch@,$(ARCH)-$(RT),;t t
 1054 s,@MAJOR@,$(MAJOR),;t t
 1055 s,@MINOR@,$(MINOR),;t t
 1056 s,@TEENY@,$(TEENY),;t t
 1057 s,@ruby_version@,$(ruby_version),;t t
 1058 s,@RUBY_PROGRAM_VERSION@,$$(MAJOR).$$(MINOR).$$(TEENY),;t t
 1059 s,@RUBY_API_VERSION@,$$(MAJOR).$$(MINOR),;t t
 1060 s,@rubylibprefix@,$${prefix}/lib/$${RUBY_BASE_NAME},;t t
 1061 s,@rubyarchdir@,$${rubylibdir}/$${arch},;t t
 1062 s,@rubylibdir@,$${rubylibprefix}/$${ruby_version},;t t
 1063 s,@sitedir@,$${rubylibprefix}/site_ruby,;t t
 1064 s,@sitearchdir@,$${sitelibdir}/$${sitearch},;t t
 1065 s,@sitelibdir@,$${sitedir}/$${ruby_version},;t t
 1066 s,@vendordir@,$${rubylibprefix}/vendor_ruby,;t t
 1067 s,@vendorarchdir@,$${vendorlibdir}/$${sitearch},;t t
 1068 s,@vendorlibdir@,$${vendordir}/$${ruby_version},;t t
 1069 s,@rubyhdrdir@,$$(includedir)/$${RUBY_BASE_NAME}-$$(ruby_version),;t t
 1070 s,@sitehdrdir@,$$(rubyhdrdir)/site_ruby,;t t
 1071 s,@vendorhdrdir@,$$(rubyhdrdir)/vendor_ruby,;t t
 1072 s,@rubyarchhdrdir@,$$(rubyhdrdir)/$${arch},;t t
 1073 s,@sitearchhdrdir@,$$(sitehdrdir)/$${sitearch},;t t
 1074 s,@vendorarchhdrdir@,$$(vendorhdrdir)/$${sitearch},;t t
 1075 s,@PLATFORM_DIR@,$(PLATFORM_DIR),;t t
 1076 s,@THREAD_MODEL@,$(THREAD_MODEL),;t t
 1077 s,@configure_args@,--with-make-prog=nmake --enable-shared $(configure_args),;t t
 1078 s,@configure_input@,$$configure_input,;t t
 1079 s,@srcdir@,$(srcdir),;t t
 1080 s,@top_srcdir@,$(srcdir),;t t
 1081 s,@try_header@,try_compile,;t t
 1082 s,@ruby_pc@,$(ruby_pc),;t t
 1083 s,@MJIT_SUPPORT@,$(MJIT_SUPPORT),;t t
 1084 <<KEEP
 1085 
 1086 miniruby: miniruby$(EXEEXT)
 1087 
 1088 miniruby$(EXEEXT):
 1089 		@echo $(LIBS)
 1090 		$(ECHO) linking $(@:\=/)
 1091 		$(Q) $(PURIFY) $(CC) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(LIBS) -Fe$@ -link $(LDFLAGS)
 1092 		@$(RM) miniruby.lib miniruby.exp
 1093 		$(Q) miniruby.exe -v
 1094 		$(Q) $(LDSHARED_1)
 1095 		$(Q) $(LDSHARED_2)
 1096 
 1097 miniruby.rc:
 1098 		@exit > $@
 1099 
 1100 !if "$(PROGRAM)" != ""
 1101 $(PROGRAM):	$(MAINOBJ) $(LIBRUBY_SO) $(RUBY_INSTALL_NAME).res
 1102 		$(ECHO) linking $(@:\=/)
 1103 		$(Q) $(PURIFY) $(CC) $(MAINOBJ) $(EXTOBJS) $(RUBY_INSTALL_NAME).res \
 1104 			$(OUTFLAG)$@ $(LIBRUBYARG) -link $(LDFLAGS) $(XLDFLAGS)
 1105 		$(Q) $(LDSHARED_0)
 1106 		$(Q) $(LDSHARED_1)
 1107 		$(Q) $(LDSHARED_2)
 1108 !endif
 1109 
 1110 !if "$(WPROGRAM)" != ""
 1111 $(WPROGRAM):	$(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $(RUBYW_INSTALL_NAME).res
 1112 		$(ECHO) linking $(@:\=/)
 1113 		$(Q) $(PURIFY) $(CC) $(MAINOBJ) $(WINMAINOBJ) \
 1114 			$(RUBYW_INSTALL_NAME).res $(OUTFLAG)$@ $(LIBRUBYARG) \
 1115 			-link $(LDFLAGS) $(XLDFLAGS) -subsystem:Windows
 1116 		$(Q) $(LDSHARED_0)
 1117 		$(Q) $(LDSHARED_1)
 1118 		$(Q) $(LDSHARED_2)
 1119 !endif
 1120 
 1121 !if "$(STUBPROGRAM)" != ""
 1122 $(STUBPROGRAM):	rubystub.$(OBJEXT) $(LIBRUBY) $(LIBRUBY_SO) $(RUBY_INSTALL_NAME).res
 1123 		$(ECHO) linking $(@:\=/)
 1124 		$(Q) $(PURIFY) $(CC) rubystub.$(OBJEXT) $(RUBY_INSTALL_NAME).res \
 1125 			$(OUTFLAG)$@ $(LIBRUBYARG) -link $(LDFLAGS) $(XLDFLAGS)
 1126 		$(Q) $(LDSHARED_0)
 1127 		$(Q) $(LDSHARED_1)
 1128 		$(Q) $(LDSHARED_2)
 1129 !endif
 1130 
 1131 !if "$(LIBRUBY_SO_UPDATE)" == ""
 1132 PRE_LIBRUBY_UPDATE = $(RM) $(LIBRUBY_EXTS)
 1133 !else
 1134 PRE_LIBRUBY_UPDATE =
 1135 !endif
 1136 
 1137 $(LIBRUBY_A):	$(OBJS) $(INITOBJS)
 1138 !if "$(EXTSTATIC)" != ""
 1139 		@-$(PRE_LIBRUBY_UPDATE)
 1140 !endif
 1141 		$(ECHO) linking static-library $(@:\=/)
 1142 		$(Q) $(AR) $(ARFLAGS)$@ $(OBJS) $(INITOBJS)
 1143 
 1144 $(LIBRUBY):	$(RUBYDEF)
 1145 		$(ECHO) linking import-library $(@:\=/)
 1146 		$(Q) $(AR) $(ARFLAGS)$@ -def:$(RUBYDEF)
 1147 
 1148 $(LIBRUBY_SO):	$(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
 1149 		@echo $(DLDOBJS)
 1150 !if "$(EXTSTATIC)" == ""
 1151 		@-$(PRE_LIBRUBY_UPDATE)
 1152 !endif
 1153 		$(ECHO) linking shared-library $(@:\=/)
 1154 		$(Q) $(LDSHARED) $(DLDOBJS) $(LIBRUBY_A) \
 1155 			$(RUBY_SO_NAME).res $(SOLIBS) $(EXTSOLIBS) $(LIBS) -Fe$@ -link $(LDFLAGS) \
 1156 			$(LIBRUBY_DLDFLAGS)
 1157 		@$(RM) dummy.lib dummy.exp
 1158 		$(Q) $(LDSHARED_0)
 1159 		$(Q) $(LDSHARED_1)
 1160 		$(Q) $(LDSHARED_2)
 1161 # | findstr -v -c:LNK4049 -c:LNK4217
 1162 
 1163 $(RUBYDEF):	$(LIBRUBY_A) $(RBCONFIG)
 1164 		$(ECHO) generating $(@:\=/)
 1165 		$(Q) $(MINIRUBY) $(srcdir)/win32/mkexports.rb \
 1166 		  -output=$@ -arch=$(ARCH) $(LIBRUBY_A)
 1167 
 1168 {$(win_srcdir)}.def.lib:
 1169 		$(Q) $(AR) $(ARFLAGS)$@ -def:$<
 1170 
 1171 clean-local::
 1172 		$(Q)$(RM) $(WINMAINOBJ) ext\extinit.c ext\extinit.$(OBJEXT) ext\vc*.pdb miniruby.lib
 1173 		$(Q)$(RM) $(RUBY_INSTALL_NAME).res $(RUBYW_INSTALL_NAME).res $(RUBY_SO_NAME).res
 1174 		$(Q)$(RM) miniruby.rc $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc
 1175 		$(Q)$(RM) *.map *.pdb *.ilk *.exp $(RUBYDEF) ext\ripper\y.output
 1176 
 1177 distclean-local::
 1178 		$(Q)$(RM) ext\config.cache $(RBCONFIG:/=\) $(CONFIG_H:/=\)
 1179 		-$(Q)$(RM) $(INSTALLED_LIST:/=\) $(arch_hdrdir:/=\)\ruby\config.h verconf.h
 1180 		-$(Q)$(RMDIRS) $(arch_hdrdir:/=\)\ruby
 1181 
 1182 ext/clean.mk ext/distclean.mk ext/realclean.mk::
 1183 	$(Q)if exist $(EXTS_MK) $(MAKE) -k -f $(EXTS_MK) top_srcdir=$(srcdir) $(*F)
 1184 
 1185 ext/clean gems/clean ext/distclean gems/distclean ext/realclean gems/realclean::
 1186 		$(Q)cd $(@D) 2>nul && (for /R $(EXTS) %I in (.) \
 1187 		do $(Q)if exist %I\Makefile ( \
 1188 		    cd %I && ( \
 1189 		    call set n=%I && \
 1190 		    call set n=%n:%CD%\$(@D)\=% && \
 1191 		    call set n=%n:\.=% && \
 1192 		    call echo $(@F)ing %n:\=/% & \
 1193 		    $(MAKE) $(MFLAGS) $(@F) & \
 1194 		    cd %CD% & \
 1195 		    $(RMDIRS) %I \
 1196 		))) || @
 1197 
 1198 ext/distclean gems/distclean ext/realclean gems/realclean::
 1199 		$(Q)cd $(@D) 2>nul && (for /R $(EXTS) %I in (exts.mk*) \
 1200 		do $(Q)(del %I & rmdir %~dpI)) || @
 1201 		-$(Q)rmdir $(@D) 2> nul || @
 1202 
 1203 clean-enc distclean-enc realclean-enc:
 1204 !if exist($(ENC_MK))
 1205 	$(ECHO) $(@:-enc=ing) encodings
 1206 	-$(Q)$(MAKE) $(MAKE_ENC) $(@:-enc=)
 1207 !endif
 1208 
 1209 $(RBCONFIG): $(PREP)
 1210 
 1211 $(RCFILES): $(RBCONFIG) $(srcdir)/revision.h $(srcdir)/win32/resource.rb
 1212 		@$(MINIRUBY) $(srcdir)/win32/resource.rb \
 1213 			-ruby_name=$(RUBY_INSTALL_NAME) \
 1214 			-rubyw_name=$(RUBYW_INSTALL_NAME) \
 1215 			-so_name=$(RUBY_SO_NAME) \
 1216 			. $(icondirs) $(win_srcdir)
 1217 
 1218 update-benchmark-driver:
 1219 	$(GIT) clone https://github.com/benchmark-driver/benchmark-driver $(srcdir)/benchmark/benchmark-driver || \
 1220 	  $(GIT) -C $(srcdir)/benchmark/benchmark-driver pull origin master
 1221 
 1222 $(ruby_pc): $(RBCONFIG)
 1223 	@$(BOOTSTRAPRUBY) $(srcdir)/tool/expand-config.rb \
 1224 		-output=$@ -mode=$(INSTALL_DATA_MODE) -config=rbconfig.rb \
 1225 		$(srcdir)/template/ruby.pc.in
 1226 
 1227 {$(srcdir)/coroutine/win32}.asm{coroutine/win32}.obj:
 1228 	$(ECHO) assembling $(<:\=/)
 1229 	$(Q) $(AS) $(ASFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(<:\=/)
 1230 {$(srcdir)/coroutine/win64}.asm{coroutine/win64}.obj:
 1231 	$(ECHO) assembling $(<:\=/)
 1232 	$(Q) $(AS) $(ASFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(<:\=/)
 1233 {$(srcdir)/coroutine/copy}.c{coroutine/copy}.obj:
 1234 	$(ECHO) compiling $(<:\=/)
 1235 	$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/)
 1236 
 1237 {$(srcdir)/enc/trans}.c.obj:
 1238 	$(ECHO) compiling $(<:\=/)
 1239 	$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/)
 1240 {$(srcdir)/enc}.c.obj:
 1241 	$(ECHO) compiling $(<:\=/)
 1242 	$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/)
 1243 {$(srcdir)/missing}.c.obj:
 1244 	$(ECHO) compiling $(<:\=/)
 1245 	$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/)
 1246 {$(win_srcdir)}.c.obj:
 1247 	$(ECHO) compiling $(<:\=/)
 1248 	$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/)
 1249 {$(srcdir)}.c{}.obj:
 1250 	$(ECHO) compiling $(<:\=/)
 1251 	$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/)
 1252 .c.obj:
 1253 	$(ECHO) compiling $(<:\=/)
 1254 	$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/)
 1255 
 1256 {$(srcdir)/missing}.c.asm:
 1257 	$(ECHO) translating $(<:\=/)
 1258 	$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa$@ -c $(CSRCFLAG)$(<:\=/)
 1259 {$(win_srcdir)}.c.asm:
 1260 	$(ECHO) translating $(<:\=/)
 1261 	$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa$@ -c $(CSRCFLAG)$(<:\=/)
 1262 {$(srcdir)}.c{}.asm:
 1263 	$(ECHO) translating $(<:\=/)
 1264 	$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa$@ -c $(CSRCFLAG)$(<:\=/)
 1265 .c.asm:
 1266 	$(ECHO) translating $(<:\=/)
 1267 	$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa$@ -c $(CSRCFLAG)$(<:\=/)
 1268 
 1269 {$(srcdir)/missing}.c.i:
 1270 	$(ECHO) preprocessing $(<:\=/)
 1271 	$(Q) $(CC) $(XCFLAGS) $(CPPFLAGS) -P $(CSRCFLAG)$(<:\=/) > $@
 1272 {$(win_srcdir)}.c.i:
 1273 	$(ECHO) preprocessing $(<:\=/)
 1274 	$(Q) $(CC) $(XCFLAGS) $(CPPFLAGS) -P $(CSRCFLAG)$(<:\=/)
 1275 {$(srcdir)}.c{}.i:
 1276 	$(ECHO) preprocessing $(<:\=/)
 1277 	$(Q) $(CC) $(XCFLAGS) $(CPPFLAGS) -P $(CSRCFLAG)$(<:\=/)
 1278 .c.i:
 1279 	$(ECHO) preprocessing $(<:\=/)
 1280 	$(Q) $(CC) $(XCFLAGS) $(CPPFLAGS) -P $(CSRCFLAG)$(<:\=/)
 1281 
 1282 .rc.res:
 1283 	$(ECHO) compiling $(<:\=/)
 1284 	$(Q) $(RC) $(RCFLAGS) -I. -I$(<D) $(iconinc) -I$(srcdir)/win32 $(RFLAGS) -fo$@ $(<:\=/)
 1285 
 1286 lex.c: {$(srcdir)}lex.c.blt
 1287 	copy $(?:/=\) $@
 1288 
 1289 $(srcdir)/enc/jis/props.h: {$(srcdir)}enc/jis/props.h.blt
 1290 	@if not exist $(@D:/=\) md $(@D:/=\)
 1291 	$(ECHO) copying $@
 1292 	$(Q) copy $(?:/=\) $(@:/=\) > nul
 1293 
 1294 $(OBJS): {$(hdrdir)/ruby}win32.h
 1295 
 1296 win32/win32.$(OBJEXT): {$(VPATH)}id.h
 1297 dir.$(OBJEXT) win32/win32.$(OBJEXT): {$(srcdir)}win32/dir.h
 1298 file.$(OBJEXT) win32/win32.$(OBJEXT): {$(VPATH)}win32/file.h
 1299 
 1300 ext/extinit.obj: ext/extinit.c $(SETUP)
 1301 	$(ECHO) compiling ext/extinit.c
 1302 	$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c
 1303 
 1304 probes.h: {$(VPATH)}probes.dmyh
 1305 	@$(ECHO) making dummy <<$(DEST_FILE)
 1306 #include "$(*F).dmyh"
 1307 <<KEEP
 1308 
 1309 main: mjit-headers
 1310 yes-mjit-headers: $(MJIT_PRECOMPILED_HEADER)
 1311 clean-local::
 1312 	$(Q)$(RM) $(MJIT_PRECOMPILED_HEADER_NAME) $(MJIT_PRECOMPILED_HEADER_NAME:.pch=.)$(OBJEXT)
 1313 	$(Q)$(RM) $(TIMESTAMPDIR)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=.time) mjit_config.h
 1314 	$(Q)$(RM) $(MJIT_HEADER_INSTALL_DIR)/rb_mjit_header-*.pch
 1315 	$(Q)$(RM) $(MJIT_HEADER_INSTALL_DIR)/rb_mjit_header-*.pdb
 1316 	$(Q)$(RM) $(MJIT_HEADER_INSTALL_DIR)/rb_mjit_header-*.$(OBJEXT)
 1317 	-$(Q) $(RMDIRS) $(MJIT_HEADER_INSTALL_DIR) 2> $(NULL) || exit 0
 1318 	$(Q)$(RM) $(arch_hdrdir)/rb_mjit_header-*.pch
 1319 	$(Q)$(RM) $(arch_hdrdir)/rb_mjit_header-*.pdb
 1320 	$(Q)$(RM) $(arch_hdrdir)/rb_mjit_header-*.$(OBJEXT)
 1321 
 1322 # Non-mswin environment is not using prebuilt precompiled header because upgrading compiler
 1323 # or changing compiler options may break MJIT so build (currently only by --jit-debug though).
 1324 #
 1325 # But mswin is building precompiled header because cl.exe cannot leave macro after preprocess.
 1326 # As a workaround to use macro without installing many source files, it uses precompiled header
 1327 # without sufficient guard for a broken build.
 1328 #
 1329 # TODO: Fix the above issue by including VC version in header name, and create another header
 1330 # for --jit-debug as well.
 1331 $(TIMESTAMPDIR)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=).time: probes.h vm.$(OBJEXT)
 1332 	$(ECHO) building $(@F:.time=.pch)
 1333 	$(Q) $(CC) -DMJIT_HEADER $(CFLAGS) $(XCFLAGS:-DRUBY_EXPORT =) -URUBY_EXPORT $(CPPFLAGS) $(srcdir)/vm.c -c -Yc \
 1334 	  $(COUTFLAG)$(@F:.time=.)$(OBJEXT) -Fd$(@F:.time=.pdb) -Fp$(@F:.time=.pch).new
 1335 	$(Q) $(IFCHANGE) "--timestamp=$@" $(@F:.time=.pch) $(@F:.time=.pch).new
 1336 
 1337 $(MJIT_PRECOMPILED_HEADER_NAME): $(TIMESTAMPDIR)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=).time
 1338 
 1339 $(MJIT_PRECOMPILED_HEADER): $(MJIT_PRECOMPILED_HEADER_NAME)
 1340 	$(Q) $(MAKEDIRS) $(MJIT_HEADER_INSTALL_DIR)
 1341 	$(Q) $(MAKE_LINK) $(MJIT_PRECOMPILED_HEADER_NAME) $@
 1342 	$(Q) $(MAKE_LINK) $(MJIT_PRECOMPILED_HEADER_NAME:.pch=.)$(OBJEXT) $(MJIT_HEADER_INSTALL_DIR)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=.)$(OBJEXT)
 1343 	$(Q) $(MAKE_LINK) $(MJIT_PRECOMPILED_HEADER_NAME:.pch=.pdb) $(MJIT_HEADER_INSTALL_DIR)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=.pdb)
 1344 	$(Q) $(MAKEDIRS) $(arch_hdrdir)
 1345 	$(Q) $(MAKE_LINK) $(MJIT_PRECOMPILED_HEADER_NAME) $(arch_hdrdir)/$(MJIT_PRECOMPILED_HEADER_NAME)
 1346 	$(Q) $(MAKE_LINK) $(MJIT_PRECOMPILED_HEADER_NAME:.pch=.)$(OBJEXT) $(arch_hdrdir)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=.)$(OBJEXT)
 1347 	$(Q) $(MAKE_LINK) $(MJIT_PRECOMPILED_HEADER_NAME:.pch=.pdb) $(arch_hdrdir)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=.pdb)
 1348 
 1349 INSNS	= opt_sc.inc optinsn.inc optunifs.inc insns.inc insns_info.inc \
 1350 	  vmtc.inc vm.inc mjit_compile.inc
 1351 
 1352 !if [exit > insns_rules.mk]
 1353 !else if [for %I in ($(INSNS)) do \
 1354 	@for %J in (\
 1355 "%I: $$(srcdir)/insns.def {$$(VPATH)}vm_opts.h \" \
 1356 "	  $$(srcdir)/defs/opt_operand.def $$(srcdir)/defs/opt_insn_unif.def \" \
 1357 "	  $$(srcdir)/tool/insns2vm.rb" \
 1358 "	@$$(RM) $$(PROGRAM)" \
 1359 "	$$(Q) $$(BASERUBY) -Ku $$(srcdir)/tool/insns2vm.rb $$(INSNS2VMOPT) %I" \
 1360 "" \
 1361 ) do @echo.%~J>>insns_rules.mk]
 1362 !else
 1363 ! include insns_rules.mk
 1364 ! if [del insns_rules.mk > nul]
 1365 ! endif
 1366 !endif
 1367 
 1368 verconf.h: verconf.mk
 1369 
 1370 loadpath: verconf.h
 1371 	@$(CPP) $(XCFLAGS) $(CPPFLAGS) $(srcdir)/loadpath.c | \
 1372 	sed -e '1,/^const char ruby_initial_load_paths/d;/;/,$$d' \
 1373 	    -e '/^^ /!d;s/ *"\\\\0"$$//;s/" *"//g'
 1374 
 1375 mjit_config.h: $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
 1376 	@echo making <<$@
 1377 #ifndef RUBY_MJIT_CONFIG_H
 1378 #define RUBY_MJIT_CONFIG_H 1
 1379 
 1380 #define MJIT_CONFIG_ESCAPED_EQ "="
 1381 #define MJIT_HEADER_INSTALL_DIR "/$(MJIT_HEADER_INSTALL_DIR)"
 1382 #define MJIT_MIN_HEADER_NAME "$(MJIT_MIN_HEADER_NAME)"
 1383 #define MJIT_PRECOMPILED_HEADER_NAME "$(MJIT_PRECOMPILED_HEADER_NAME)"
 1384 <<KEEP
 1385 	@
 1386 	@(set sep=#define MJIT_CC_COMMON ) & \
 1387 	for %I in ($(MJIT_CC)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
 1388 	@echo /* MJIT_CC_COMMON */>> $@
 1389 	@
 1390 	@(set sep=#define MJIT_CFLAGS ) & \
 1391 	for %I in ($(RUNTIMEFLAG) $(ARCH_FLAG)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
 1392 	@echo /* MJIT_CFLAGS */>> $@
 1393 	@
 1394 	@(set sep=#define MJIT_OPTFLAGS ) & \
 1395 	for %I in ($(MJIT_OPTFLAGS:^==" MJIT_CONFIG_ESCAPED_EQ ")) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
 1396 	@echo /* MJIT_OPTFLAGS */>> $@
 1397 	@
 1398 	@(set sep=#define MJIT_DEBUGFLAGS ) & \
 1399 	for %I in ($(MJIT_DEBUGFLAGS:^==" MJIT_CONFIG_ESCAPED_EQ ")) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
 1400 	@echo /* MJIT_DEBUGFLAGS */>> $@
 1401 	@
 1402 	@(set sep=#define MJIT_LDSHARED ) & \
 1403 	for %I in ($(MJIT_LDSHARED)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
 1404 	@echo /* MJIT_LDSHARED */>> $@
 1405 	@
 1406 	@(set sep=#define MJIT_DLDFLAGS ) & \
 1407 	for %I in ($(DLDFLAGS)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
 1408 	@echo /* MJIT_DLDFLAGS */>> $@
 1409 	@
 1410 	@(set sep=#define MJIT_LIBS ) & \
 1411 	for %I in ($(LIBRUBYARG_SHARED)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
 1412 	@echo /* MJIT_LIBS */>> $@
 1413 	@
 1414 	@echo.>> $@
 1415 	@echo #endif /* RUBY_MJIT_CONFIG_H */>> $@
 1416 	@$(Q:@=: :) type $@