1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/win32/Makefile.sub
usa 3540727af5 * win32/Makefile.sub (config.status): use un.rb as cp instead of
cmd.exe's copy command.

	* lib/mkmf.rb (create_makefile): no longer need to convert path
	  separator when copying file.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25 06:07:10 +00:00

822 lines
22 KiB
Makefile

# -*- makefile -*-
SHELL = $(COMSPEC)
RUNCMD = $(COMSPEC) /c
MKFILES = Makefile
NULL = nul
!ifndef MFLAGS
MFLAGS=-l
!endif
!ifndef CROSS_COMPILING
CROSS_COMPILING = 0
!endif
!ifndef LARGEFILE_SUPPORT
LARGEFILE_SUPPORT = 1
!endif
!ifndef win_srcdir
win_srcdir = $(srcdir)/win32
!endif
#### Start of system configuration section. ####
!if defined(pathlist)
PATH = $(pathlist:;=/bin;)$(PATH)
INCLUDE = $(pathlist:;=/include;)
LIB = $(pathlist:;=/lib;)
!endif
## variables may be overridden by $(compile_dir)/Makefile
!ifndef srcdir
srcdir = ..
!endif
!ifndef RUBY_INSTALL_NAME
RUBY_INSTALL_NAME = $(PROGRAM_PREFIX)ruby$(RUBY_SUFFIX)
!endif
!if !defined(RUBYW_INSTALL_NAME) || "$(RUBYW_INSTALL_NAME)" == "$(RUBY_INSTALL_NAME)"
RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME:ruby=rubyw)
!endif
!if "$(RUBYW_INSTALL_NAME)" == "$(RUBY_INSTALL_NAME)"
RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME)w
!endif
!if !defined(icondirs) && defined(ICONDIRS)
icondirs=$(ICONDIRS)
!endif
!if defined(icondirs)
icondirs=$(icondirs:\=/)
iconinc=-I$(icondirs: = -I)
!endif
###############
.SUFFIXES: .y .def .lib
!if !defined(CC)
CC = cl
!endif
!if !defined(CPP) || "$(CPP)" == "cl"
CPP = $(CC) -E
!endif
!if !defined(YACC)
YACC = bison
!endif
AR = lib -nologo
PURIFY =
AUTOCONF = autoconf
IFCHANGE = $(COMSPEC) /C $(srcdir:/=\)\win32\ifchange.bat
RM = $(COMSPEC) /C $(srcdir:/=\)\win32\rm.bat
RMDIRS = $(COMSPEC) /C $(srcdir:/=\)\win32\rmdirs.bat
CP = copy > nul
MV = move > nul
!if !defined(BASERUBY)
BASERUBY = ruby
!endif
!if !defined(PROCESSOR_ARCHITECTURE)
PROCESSOR_ARCHITECTURE = x86
!endif
MACHINE = $(PROCESSOR_ARCHITECTURE)
!if "$(PROCESSOR_ARCHITECTURE)" == "x86"
!if !defined(PROCESSOR_LEVEL)
PROCESSOR_LEVEL = 5
!endif
!if 6 < $(PROCESSOR_LEVEL)
PROCESSOR_LEVEL = 6
!endif
!if $(MSC_VER) < 1400
PROCESSOR_FLAG = -G$(PROCESSOR_LEVEL)
!endif
CPU = i$(PROCESSOR_LEVEL)86
ARCH = i386
!else
CPU = $(PROCESSOR_ARCHITECTURE)
ARCH = $(PROCESSOR_ARCHITECTURE)
!endif
!if !defined(DEBUGFLAGS)
DEBUGFLAGS = -Zi
!endif
!if !defined(OPTFLAGS)
!if $(MSC_VER) < 1400
OPTFLAGS = -O2b2xg-
!else
OPTFLAGS = -O2b2xty-
!endif
!endif
!if !defined(PLATFORM)
PLATFORM = mswin32
!endif
!if !defined(RT)
!error RT not defined. Retry from configure pass.
!endif
arch = $(ARCH)-$(PLATFORM)
!if !defined(ruby_version)
ruby_version = $(MAJOR).$(MINOR).$(TEENY)
!endif
!ifndef RUBY_SO_NAME
RUBY_SO_NAME = $(RT)-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR)$(TEENY)
!endif
!ifndef RUBY_PLATFORM
RUBY_PLATFORM = $(arch)
!endif
!if !defined(prefix)
prefix = /usr
!endif
!if !defined(exec_prefix)
exec_prefix = $(prefix)
!endif
!if !defined(libdir)
libdir = $(exec_prefix)/lib
!endif
!if !defined(datadir)
datadir = $(prefix)/share
!endif
!ifndef EXTOUT
EXTOUT = .ext
!endif
!ifndef RIDATADIR
RIDATADIR = $(DESTDIR)$(datadir)/ri/$(MAJOR).$(MINOR)/system
!endif
!ifndef TESTUI
TESTUI = console
!endif
!ifndef TESTS
TESTS =
!endif
!ifndef RDOCTARGET
RDOCTARGET = install-doc
!endif
OUTFLAG = -Fe
COUTFLAG = -Fo
!if !defined(RUNTIMEFLAG)
RUNTIMEFLAG = -MD
!endif
!if !defined(COMPILERFLAG)
COMPILERFLAG = -Zm600
!endif
!if !defined(CFLAGS)
CFLAGS = $(RUNTIMEFLAG) $(DEBUGFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) $(COMPILERFLAG)
!endif
!if !defined(CXXFLAGS)
CXXFLAGS = $(CFLAGS)
!endif
!if !defined(LDFLAGS)
LDFLAGS = -link -incremental:no -debug -opt:ref -opt:icf
!endif
!if !defined(XLDFLAGS)
XLDFLAGS = -stack:$(STACK)
!endif
!if !defined(RFLAGS)
RFLAGS = -r
!endif
!if !defined(EXTLIBS)
EXTLIBS =
!endif
!if !defined(LIBS)
LIBS = oldnames.lib user32.lib advapi32.lib shell32.lib ws2_32.lib $(EXTLIBS)
!endif
!if !defined(MISSING)
MISSING = acosh.obj cbrt.obj crypt.obj erf.obj lgamma_r.obj strlcat.obj strlcpy.obj tgamma.obj win32.obj langinfo.obj
!endif
ARFLAGS = -machine:$(MACHINE) -out:
CC = $(CC) -nologo
LD = $(CC)
LDSHARED = $(LD) -LD
XCFLAGS = -DRUBY_EXPORT -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) -I$(srcdir)/missing $(XCFLAGS)
!if $(MSC_VER) >= 1400
# Prevents VC++ 2005 (cl ver 14) warnings
CRTDEFFLAGS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
MANIFESTTOOL = mt -nologo
LDSHARED_0 = @$(MINIRUBY) -run -e wait_writable -- -n 10 $@
LDSHARED_1 = $(MANIFESTTOOL) -manifest $(@).manifest -outputresource:$(@);2
LDSHARED_2 = @$(RM) $(@:/=\).manifest
!endif
CPPFLAGS = $(CRTDEFFLAGS) $(DEFS) $(ARCHDEFS) $(CPPFLAGS)
DLDFLAGS = $(LDFLAGS) -dll
SOLIBS =
LIBRUBY_LDSHARED = $(LDSHARED)
LIBRUBY_DLDFLAGS = $(EXTLDFLAGS) -implib:dummy.lib -def:$(RUBYDEF)
EXEEXT = .exe
!if !defined(PROGRAM)
PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
!endif
!if !defined(WPROGRAM) && defined(RUBYW_INSTALL_NAME)
WPROGRAM=$(RUBYW_INSTALL_NAME)$(EXEEXT)
!endif
RUBYDEF = $(RUBY_SO_NAME).def
!if $(CROSS_COMPILING)
MINIRUBY = $(RUBY) -I$(MAKEDIR) -rfake
RUNRUBY = $(MINIRUBY)
!else
MINIRUBY = .\miniruby$(EXEEXT) -I$(srcdir)/lib
RUNRUBY = .\$(PROGRAM) -I$(srcdir)/lib -I"$(EXTOUT)/$(arch)"
!endif
MINIRUBY = $(MINIRUBY) $(MINIRUBYOPT)
RUNRUBY = $(RUNRUBY) "$(srcdir)/runruby.rb" --extout="$(EXTOUT)" $(RUNRUBYOPT) --
!ifndef RUBY
RUBY = ruby
!endif
!if !defined(STACK)
!if "$(ARCH)" == "x64" || "$(ARCH)" == "ia64"
STACK = 0x400000
!else
STACK = 0x200000
!endif
!if defined(STACK_COMMIT)
STACK = $(STACK),$(STACK_COMMIT)
!endif
!endif
ORGLIBPATH = $(LIB)
#### End of system configuration section. ####
LIBRUBY_A = $(RUBY_SO_NAME)-static.lib
LIBRUBY_SO = $(RUBY_SO_NAME).dll
LIBRUBY = $(RUBY_SO_NAME).lib
LIBRUBYARG = $(LIBRUBY)
THREAD_MODEL = win32
!if $(CROSS_COMPILING)
PREP = fake.rb
!else
PREP = miniruby$(EXEEXT)
!endif
!if !defined(EXTSTATIC)
EXTSTATIC =
!endif
OBJEXT = obj
ASMEXT = asm
INSTALLED_LIST= .installed.list
MKMAIN_CMD = mkmain.bat
!if !defined(WINMAINOBJ)
WINMAINOBJ = winmain.$(OBJEXT)
!endif
ARCHMINIOBJS = dmydln.$(OBJEXT)
LIBOBJS = $(MISSING) $(LIBOBJS)
!ifndef COMMON_LIBS
COMMON_LIBS = m
!endif
!ifndef COMMON_MACROS
COMMON_MACROS = WIN32_LEAN_AND_MEAN WIN32
!endif
!ifndef COMMON_HEADERS
COMMON_HEADERS = winsock2.h ws2tcpip.h windows.h
!endif
arch_hdrdir = $(EXTOUT)/include/$(arch)
hdrdir = $(srcdir)/include
VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/enc;$(srcdir)/missing;$(win_srcdir)
!if exist($(srcdir)/.svn)
VCS = svn
VCSUP = $(VCS) up $(SVNUPOPTIONS)
!else if exist($(srcdir)/.git/svn)
VCS = git svn
VCSUP = $(VCS) rebase $(GITSVNREBASEOPTIONS)
!else if exist($(srcdir)/.git)
VCS = git
VCSUP = $(VCS) pull $(GITPULLOPTIONS)
!endif
all: $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub $(srcdir)/common.mk
ruby: $(PROGRAM)
rubyw: $(WPROGRAM)
INSNS = opt_sc.inc optinsn.inc optunifs.inc insns.inc insns_info.inc \
vmtc.inc vm.inc
up::
@(set LC_TIME=C & $(VCSUP) "$(srcdir)")
!include $(srcdir)/common.mk
$(MKFILES): $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub $(win_srcdir)/configure.bat $(win_srcdir)/setup.mak $(win_srcdir)/enc-setup.mak $(srcdir)/enc/Makefile.in
$(COMSPEC) /C $(win_srcdir:/=\)\configure.bat $(configure_args)
@echo $(MKFILES) should be updated, re-run $(MAKE).
@exit 1
RUBY_CONFIG_H = $(arch_hdrdir)/ruby/config.h
CONFIG_H = ./.config.h.time
config: config.status
config.status: $(CONFIG_H)
BANG = !
!if exist(config.h)
!include config.h
!endif
$(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
@echo Creating config.h
!if !exist("$(arch_hdrdir)")
@md $(arch_hdrdir:/=\)
!endif
!if !exist("$(arch_hdrdir)/ruby")
@md $(arch_hdrdir:/=\)\ruby
!endif
@$(IFCHANGE) $(RUBY_CONFIG_H:/=\) <<
#if _MSC_VER != $(MSC_VER)
#error MSC version unmatch: _MSC_VER: $(MSC_VER) is expected.
#endif
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
!if $(MSC_VER) >= 1400
#define HAVE_LONG_LONG 1
!endif
#define HAVE_OFF_T 1
#define SIZEOF_INT 4
#define SIZEOF_SHORT 2
#define SIZEOF_LONG 4
!if $(MSC_VER) >= 1400
#define SIZEOF_LONG_LONG 8
!else
#define SIZEOF_LONG_LONG 0
!endif
#define SIZEOF___INT64 8
#define _INTEGRAL_MAX_BITS 64
!if $(LARGEFILE_SUPPORT)
#define SIZEOF_OFF_T 8
!else
#define SIZEOF_OFF_T 4
!endif
!if "$(ARCH)" == "x64" || "$(ARCH)" == "ia64"
#define SIZEOF_VOIDP 8
!else
#define SIZEOF_VOIDP 4
!endif
#define SIZEOF_FLOAT 4
#define SIZEOF_DOUBLE 8
!if $(MSC_VER) >= 1400
#define SIZEOF_TIME_T 8
!else
#define SIZEOF_TIME_T 4
!endif
#define SIZEOF_RLIM_T 0
!if "$(ARCH)" == "x64" || "$(ARCH)" == "ia64"
#define SIZEOF_SIZE_T 8
#define SIZEOF_PTRDIFF_T 8
#define SIZEOF_INTPTR_T 8
#define SIZEOF_UINTPTR_T 8
!else
#define SIZEOF_SIZE_T 4
#define SIZEOF_PTRDIFF_T 4
#define SIZEOF_INTPTR_T 4
#define SIZEOF_UINTPTR_T 4
!endif
!if $(MSC_VER) < 1400
#define SIZE_MAX UINT_MAX
!endif
#define HAVE_PROTOTYPES 1
#define TOKEN_PASTE(x,y) x##y
#define HAVE_STDARG_PROTOTYPES 1
!if $(MSC_VER) > 1100
#define NORETURN(x) __declspec(noreturn) x
!endif
!if $(MSC_VER) >= 1300
#define DEPRECATED(x) __declspec(deprecated) x
#define NOINLINE(x) __declspec(noinline) x
!endif
#define FUNC_STDCALL(x) __stdcall x
#define FUNC_CDECL(x) __cdecl x
#define FUNC_FASTCALL(x) __fastcall x
#define RUBY_EXTERN extern __declspec(dllimport)
#define HAVE_DECL_SYS_NERR 1
#define HAVE_LIMITS_H 1
#define HAVE_FCNTL_H 1
#define HAVE_SYS_UTIME_H 1
#define HAVE_FLOAT_H 1
#define rb_pid_t int
#define rb_gid_t int
#define rb_uid_t int
#define HAVE_STRUCT_STAT_ST_RDEV 1
#define HAVE_ST_RDEV 1
#define int8_t signed char
#define HAVE_UINT8_T 1
#define uint8_t unsigned char
#define HAVE_INT16_T 1
#define int16_t short
#define HAVE_UINT16_T 1
#define uint16_t unsigned short
#define HAVE_INT32_T 1
#define int32_t int
#define HAVE_UINT32_T 1
#define uint32_t unsigned int
#define HAVE_INT64_T HAVE_LONG_LONG
#define int64_t __int64
#define HAVE_UINT64_T HAVE_LONG_LONG
#define uint64_t unsigned __int64
#define HAVE_INTPTR_T 1
#define HAVE_UINTPTR_T 1
#define HAVE_SSIZE_T 1
!if "$(ARCH)" == "x64" || "$(ARCH)" == "ia64"
#define ssize_t __int64
!else
#define ssize_t int
!endif
#define GETGROUPS_T int
#define RETSIGTYPE void
#define HAVE_ALLOCA 1
#define HAVE_DUP2 1
#define HAVE_MEMCMP 1
#define HAVE_MEMMOVE 1
#define HAVE_MKDIR 1
#define HAVE_STRCASECMP 1
#define HAVE_STRNCASECMP 1
#define HAVE_STRERROR 1
#define HAVE_STRFTIME 1
#define HAVE_STRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOD 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_FLOCK 1
#define HAVE_ISNAN 1
#define HAVE_FINITE 1
#define HAVE_HYPOT 1
#define HAVE_FMOD 1
#define HAVE_FREXP 1
#define HAVE_MODF 1
#define HAVE_WAITPID 1
#define HAVE_FSYNC 1
#define HAVE_GETCWD 1
#define HAVE_TRUNCATE 1
#define HAVE_FTRUNCATE 1
#define HAVE_FSEEKO 1
#define HAVE_FTELLO 1
#define HAVE_TIMES 1
#define HAVE_FCNTL 1
#define HAVE_LINK 1
#define HAVE__SETJMP 1
#define HAVE_TELLDIR 1
#define HAVE_SEEKDIR 1
#define HAVE_MKTIME 1
#define HAVE_COSH 1
#define HAVE_SINH 1
#define HAVE_TANH 1
#define HAVE_TZNAME 1
#define HAVE_DAYLIGHT 1
#define SETPGRP_VOID 1
#define RSHIFT(x,y) ((x)>>(int)y)
#define FILE_COUNT _cnt
#define FILE_READPTR _ptr
#define HAVE_RB_FD_INIT 1
#define RUBY_SETJMP(env) _setjmp(env)
#define RUBY_LONGJMP(env,val) longjmp(env,val)
#define RUBY_JMP_BUF jmp_buf
#define inline __inline
#define NEED_IO_SEEK_BETWEEN_RW 1
!if "$(PROCESSOR_ARCHITECTURE)" == "x86" || "$(ARCH)" == "x64" || "$(ARCH)" == "ia64"
#define STACK_GROW_DIRECTION -1
!endif
#define CANONICALIZATION_FOR_MATHN 1
#define DEFAULT_KCODE KCODE_NONE
#define LOAD_RELATIVE 1
#define DLEXT ".so"
#define RUBY_LIB_VERSION STRINGIZE(RUBY_VERSION_MAJOR)"."STRINGIZE(RUBY_VERSION_MINOR)"."STRINGIZE(RUBY_VERSION_TEENY)
#define RUBY_LIB_PREFIX "/lib/$(RUBY_INSTALL_NAME)"
#define RUBY_LIB RUBY_LIB_PREFIX"/"RUBY_LIB_VERSION
#define RUBY_SITE_LIB RUBY_LIB_PREFIX"/site_ruby"
#define RUBY_SITE_LIB2 RUBY_SITE_LIB"/"RUBY_LIB_VERSION
#define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby"
#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB"/"RUBY_LIB_VERSION
#define RUBY_PLATFORM "$(arch)"
#define RUBY_ARCHLIB "/lib/$(RUBY_INSTALL_NAME)/$(ruby_version)/$(ARCH)-$(PLATFORM)"
#define RUBY_SITE_ARCHLIB "/lib/$(RUBY_INSTALL_NAME)/site_ruby/$(ruby_version)/$(ARCH)-$(RT)"
#define RUBY_VENDOR_ARCHLIB "/lib/$(RUBY_INSTALL_NAME)/vendor_ruby/$(ruby_version)/$(ARCH)-$(RT)"
#define LIBRUBY_SO "$(LIBRUBY_SO)"
#if 0
$(BANG)if "$(RUBY_SO_NAME)"!="$$(RUBY_SO_NAME)" || "$(ARCH)-$(PLATFORM)"!="$$(ARCH)-$$(PLATFORM)"
config.h: nul
$(BANG)endif
#endif
<<
@exit > $(@:/=\)
#!if exist($(RUBY_CONFIG_H))
#! if exist(config_h.bak)
# @del $(RUBY_CONFIG_H:.h=_h).bak
#! endif
# @copy $(RUBY_CONFIG_H) $(RUBY_CONFIG_H:.h=_h).bak
#!endif
#!if exist($(RUBY_CONFIG_H))
# @echo NMAKE will abort if config.h is changed, then restart NMAKE.
# @fc.exe $(RUBY_CONFIG_H) $(RUBY_CONFIG_H:.h=_h).bak > nul
# @echo $(RUBY_CONFIG_H) unchanged.
# @del $(RUBY_CONFIG_H)
# @ren $(RUBY_CONFIG_H:.h=_h).bak $(RUBY_CONFIG_H)
#!endif
config.status: $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub $(srcdir)/common.mk
@echo Creating $@
@exit <<$@
# Generated automatically by Makefile.sub.
s,@SHELL@,$$(COMSPEC),;t t
s,@BUILD_FILE_SEPARATOR@,\,;t t
s,@PATH_SEPARATOR@,;,;t t
s,@CFLAGS@,$(CFLAGS),;t t
s,@DEFS@,$(DEFS),;t t
s,@CPPFLAGS@,$(CPPFLAGS),;t t
s,@CXXFLAGS@,$(CXXFLAGS),;t t
s,@FFLAGS@,$(FFLAGS),;t t
s,@LDFLAGS@,,;t t
s,@LIBS@,$(LIBS),;t t
s,@exec_prefix@,$${prefix},;t t
s,@prefix@,$(prefix),;t t
s,@program_transform_name@,s,.*,$(RUBY_PREFIX)&$(RUBY_SUFFIX),,;t t
s,@bindir@,$${exec_prefix}/bin,;t t
s,@sbindir@,$${exec_prefix}/sbin,;t t
s,@libexecdir@,$${exec_prefix}/libexec,;t t
s,@datadir@,$${prefix}/share,;t t
s,@sysconfdir@,$${prefix}/etc,;t t
s,@sharedstatedir@,/etc,;t t
s,@localstatedir@,/var,;t t
s,@libdir@,$${exec_prefix}/lib,;t t
s,@includedir@,$${prefix}/include,;t t
s,@oldincludedir@,/usr/include,;t t
s,@infodir@,$${prefix}/info,;t t
s,@mandir@,$${prefix}/man,;t t
s,@build@,$(CPU)-pc-$(PLATFORM),;t t
s,@build_alias@,$(CPU)-$(PLATFORM),;t t
s,@build_cpu@,$(CPU),;t t
s,@build_vendor@,pc,;t t
s,@build_os@,$(PLATFORM),;t t
s,@host@,$(CPU)-pc-$(PLATFORM),;t t
s,@host_alias@,$(CPU)-$(PLATFORM),;t t
s,@host_cpu@,$(CPU),;t t
s,@host_vendor@,pc,;t t
s,@host_os@,$(PLATFORM),;t t
s,@target@,$(ARCH)-pc-$(PLATFORM),;t t
s,@target_alias@,$(ARCH)-$(PLATFORM),;t t
s,@target_cpu@,$(ARCH),;t t
s,@target_vendor@,pc,;t t
s,@target_os@,$(PLATFORM),;t t
s,@CC@,$(CC),;t t
s,@CPP@,$(CPP),;t t
s,@CXX@,$$(CC),;t t
s,@LD@,$$(CC),;t t
s,@YACC@,$(YACC),;t t
s,@RANLIB@,,;t t
s,@AR@,$(AR),;t t
s,@ARFLAGS@,$(ARFLAGS),;t t
s,@LN_S@,$(LN_S),;t t
s,@SET_MAKE@,MFLAGS = -$$(MAKEFLAGS),;t t
s,@RM@,$$(COMSPEC) /C $$(top_srcdir:/=\)\win32\rm.bat,;t t
s,@RMDIRS@,$$(COMSPEC) /C $$(top_srcdir:/=\)\win32\rmdirs.bat,;t t
s,@RMALL@,$$(COMSPEC) /C rmdir /s /q,;t t
s,@LIBOBJS@,$(LIBOBJS),;t t
s,@ALLOCA@,$(ALLOCA),;t t
s,@DEFAULT_KCODE@,$(DEFAULT_KCODE),;t t
s,@EXEEXT@,.exe,;t t
s,@OBJEXT@,$(OBJEXT),;t t
s,@XCFLAGS@,$(XCFLAGS),;t t
s,@XLDFLAGS@,$(XLDFLAGS),;t t
s,@DLDFLAGS@,$(DLDFLAGS) $$(LIBPATH),;t t
s,@ARCH_FLAG@,$(ARCH_FLAG),;t t
s,@STATIC@,$(STATIC),;t t
s,@CCDLFLAGS@,,;t t
s,@LDSHARED@,$(LDSHARED),;t t
s,@DLEXT@,so,;t t
s,@LIBEXT@,lib,;t t
s,@STRIP@,$(STRIP),;t t
s,@EXTSTATIC@,$(EXTSTATIC),;t t
s,@setup@,Setup,;t t
s,@MINIRUBY@,$(MINIRUBY),;t t
s,@PREP@,miniruby$(EXEEXT),;t t
s,@RUNRUBY@,$(RUNRUBY),;t t
s,@EXTOUT@,$(EXTOUT),;t t
s,@ARCHFILE@,,;t t
s,@RDOCTARGET@,,;t t
s,@LIBRUBY_LDSHARED@,$(LIBRUBY_LDSHARED),;t t
s,@LIBRUBY_DLDFLAGS@,$(LIBRUBY_DLDFLAGS),;t t
s,@RUBY_INSTALL_NAME@,$(RUBY_INSTALL_NAME),;t t
s,@rubyw_install_name@,$(RUBYW_INSTALL_NAME),;t t
s,@RUBYW_INSTALL_NAME@,$(RUBYW_INSTALL_NAME),;t t
s,@RUBY_SO_NAME@,$(RUBY_SO_NAME),;t t
s,@LIBRUBY_A@,$$(RUBY_SO_NAME)-static.lib,;t t
s,@LIBRUBY_SO@,$$(RUBY_SO_NAME).dll,;t t
s,@LIBRUBY_ALIASES@,$(LIBRUBY_ALIASES),;t t
s,@LIBRUBY@,$$(RUBY_SO_NAME).lib,;t t
s,@LIBRUBYARG@,$$(LIBRUBYARG_SHARED),;t t
s,@LIBRUBYARG_STATIC@,$$(LIBRUBY_A),;t t
s,@LIBRUBYARG_SHARED@,$$(LIBRUBY),;t t
s,@SOLIBS@,$(SOLIBS),;t t
s,@DLDLIBS@,$(DLDLIBS),;t t
s,@ENABLE_SHARED@,yes,;t t
s,@BASERUBY@,$(BASERUBY),;t t
s,@OUTFLAG@,$(OUTFLAG),;t t
s,@COUTFLAG@,$(COUTFLAG),;t t
s,@CPPOUTFILE@,-P,;t t
s,@LIBPATHFLAG@, -libpath:"%s",;t t
s,@RPATHFLAG@,,;t t
s,@LIBARG@,%s.lib,;t t
s,@LINK_SO@,$$(LDSHARED) -Fe$$(@) $$(OBJS) $$(LIBS) $$(LOCAL_LIBS) $$(DLDFLAGS) -implib:$$(*F:.so=)-$$(arch).lib -pdb:$$(*F:.so=)-$$(arch).pdb -def:$$(DEFFILE),;t t
!if $(MSC_VER) >= 1400
s,@LINK_SO@,@$$(RUBY) -run -e wait_writable -- -n 10 $$(@),;t t
s,@LINK_SO@,$(MANIFESTTOOL) -manifest $$(@).manifest -outputresource:$$(@);2,;t t
s,@LINK_SO@,@$$(RM) $$(@:/=\).manifest,;t t
!endif
s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tc$$(<:\=/),;t t
s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tp$$(<:\=/),;t t
s,@COMPILE_RULES@,{$$(hdrdir)}.%s.%s: {$$(topdir)}.%s.%s: {$$(srcdir)}.%s.%s: .%s.%s:,;t t
s,@RULE_SUBST@,{.;$$(VPATH)}%s,;t t
s,@TRY_LINK@,$$(CC) -Feconftest $$(INCFLAGS) -I$$(hdrdir) $$(CPPFLAGS) $$(CFLAGS) $$(src) $$(LOCAL_LIBS) $$(LIBS) -link $$(LDFLAGS) $$(LIBPATH) $$(XLDFLAGS),;t t
s,@COMMON_LIBS@,$(COMMON_LIBS),;t t
s,@COMMON_MACROS@,$(COMMON_MACROS),;t t
s,@COMMON_HEADERS@,$(COMMON_HEADERS),;t t
s,@cleanobjs@,$$*.exp $$*.lib $$*.pdb,;t t
s,@DISTCLEANFILES@,vc*.pdb,;t t
s,@EXPORT_PREFIX@, ,;t t
s,@arch@,$(ARCH)-$(PLATFORM),;t t
s,@sitearch@,$(ARCH)-$(RT),;t t
s,@ruby_version@,$(ruby_version),;t t
s,@sitedir@,$${prefix}/lib/$${RUBY_INSTALL_NAME}/site_ruby,;t t
s,@vendordir@,$${prefix}/lib/$${RUBY_INSTALL_NAME}/vendor_ruby,;t t
s,@rubyhdrdir@,$$(includedir)/$${RUBY_INSTALL_NAME}-$$(ruby_version),;t t
s,@sitehdrdir@,$$(rubyhdrdir)/site_ruby,;t t
s,@vendorhdrdir@,$$(rubyhdrdir)/vendor_ruby,;t t
s,@configure_args@,--with-make-prog=nmake --enable-shared $(configure_args),;t t
s,@configure_input@,$$configure_input,;t t
s,@srcdir@,$(srcdir),;t t
s,@top_srcdir@,$(srcdir),;t t
s,@try_header@,try_compile,;t t
<<KEEP
miniruby: miniruby$(EXEEXT)
miniruby$(EXEEXT):
@echo. $(LIBS)
$(PURIFY) $(CC) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(LIBS) -Fe$@ $(LDFLAGS)
@$(RM) miniruby.lib miniruby.exp
miniruby.exe -v
$(LDSHARED_1)
$(LDSHARED_2)
!if "$(PROGRAM)" != ""
$(PROGRAM): $(MAINOBJ) $(LIBRUBY_SO) $(RUBY_INSTALL_NAME).res
$(PURIFY) $(CC) $(MAINOBJ) $(RUBY_INSTALL_NAME).res \
$(OUTFLAG)$@ $(LIBRUBYARG) $(LDFLAGS) $(XLDFLAGS)
$(LDSHARED_0)
$(LDSHARED_1)
$(LDSHARED_2)
!endif
!if "$(WPROGRAM)" != ""
$(WPROGRAM): $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $(RUBYW_INSTALL_NAME).res
$(PURIFY) $(CC) $(MAINOBJ) $(WINMAINOBJ) \
$(RUBYW_INSTALL_NAME).res $(OUTFLAG)$@ $(LIBRUBYARG) \
$(LDFLAGS) $(XLDFLAGS) -subsystem:Windows
$(LDSHARED_0)
$(LDSHARED_1)
$(LDSHARED_2)
!endif
$(LIBRUBY_A): $(OBJS) $(DMYEXT)
$(AR) $(ARFLAGS)$@ $(OBJS) $(DMYEXT)
$(LIBRUBY): $(RUBYDEF)
$(AR) $(ARFLAGS)$@ -def:$(RUBYDEF)
$(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
@echo. $(DLDOBJS)
@-$(PRE_LIBRUBY_UPDATE)
$(LDSHARED) $(MAINOBJ) $(DLDOBJS) $(LIBRUBY_A) \
$(RUBY_SO_NAME).res $(LIBS) -Fe$@ $(LDFLAGS) \
$(LIBRUBY_DLDFLAGS)
@$(RM) dummy.lib dummy.exp
$(LDSHARED_0)
$(LDSHARED_1)
$(LDSHARED_2)
$(RUBYDEF): $(LIBRUBY_A) $(PREP)
$(MINIRUBY) $(srcdir)/win32/mkexports.rb \
-output=$@ -arch=$(ARCH) $(LIBRUBY_A)
{$(win_srcdir)}.def.lib:
$(AR) $(ARFLAGS)$@ -def:$<
clean-local::
@$(RM) $(WINMAINOBJ) ext\extinit.c ext\extinit.$(OBJEXT) ext\vc*.pdb miniruby.lib
@$(RM) $(RUBY_INSTALL_NAME).res $(RUBYW_INSTALL_NAME).res $(RUBY_SO_NAME).res
@$(RM) *.map *.pdb *.ilk *.exp $(RUBYDEF) ext\ripper\y.output
distclean-local::
@$(RM) ext\config.cache $(RBCONFIG:/=\) $(CONFIG_H:/=\)
@$(RM) $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc
@-$(RM) $(INSTALLED_LIST:/=\) $(arch_hdrdir:/=\)\ruby\config.h
@-$(RMDIRS) $(arch_hdrdir:/=\)\ruby
distclean-rdoc:
@-$(RMALL) $(RDOCOUT:/=\)
clean-ext distclean-ext realclean-ext::
!if "$(EXTS)" != ""
@for %I in ($(EXTS)) \
!else
@for /R ext %I in (.) \
!endif
do @if exist %I\Makefile ( \
cd %I && ( \
echo $(@:-ext=)ing %~nI & \
$(MAKE) $(MFLAGS) $(@:-ext=) & \
cd %CD% & \
$(RMDIRS) %I \
) )
distclean-ext realclean-ext::
@-rmdir ext
$(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: $(RBCONFIG) $(srcdir)/revision.h $(srcdir)/win32/resource.rb
@$(MINIRUBY) $(srcdir)/win32/resource.rb \
-ruby_name=$(RUBY_INSTALL_NAME) \
-rubyw_name=$(RUBYW_INSTALL_NAME) \
-so_name=$(RUBY_SO_NAME) \
. $(icondirs) $(win_srcdir)
fake.rb: $(MKFILES)
@echo Creating <<$@
class Object
CROSS_COMPILING = RUBY_PLATFORM
remove_const :RUBY_PLATFORM
remove_const :RUBY_VERSION
RUBY_PLATFORM = "$(ARCH)"
RUBY_VERSION = "$(MAJOR).$(MINOR).$(TEENY)"
end
class File
remove_const :ALT_SEPARATOR
ALT_SEPARATOR = "\\"
end
<<KEEP
{$(srcdir)/enc}.c.obj:
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
{$(srcdir)/missing}.c.obj:
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
{$(srcdir)/win32}.c.obj:
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
{$(win_srcdir)}.c.obj:
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
{$(win_srcdir)/sys}.c.obj:
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
{$(srcdir)}.c.obj:
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
.c.obj:
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
{$(srcdir)/missing}.c.asm:
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa $(COUTFLAG)$@ -c -Tc$(<:\=/)
{$(srcdir)/win32}.c.asm:
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa $(COUTFLAG)$@ -c -Tc$(<:\=/)
{$(srcdir)}.c.asm:
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa $(COUTFLAG)$@ -c -Tc$(<:\=/)
.c.asm:
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa $(COUTFLAG)$@ -c -Tc$(<:\=/)
.rc.res:
$(RC) -I. -I$(<D) $(iconinc) -I$(srcdir)/win32 $(RFLAGS) -fo$@ $(<:\=/)
lex.c: {$(srcdir)}lex.c.blt
copy $(?:/=\) $@
$(OBJS): {$(hdrdir)/ruby}win32.h
dir.$(OBJEXT) win32.$(OBJEXT): {$(srcdir)}win32/dir.h
ext/extinit.obj: ext/extinit.c $(SETUP)
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c
$(INSNS):
@$(RM) $(PROGRAM)
-$(BASERUBY) -Ks $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) $@
node_name.inc:
-$(BASERUBY) -n $(srcdir)/tool/node_name.rb $? > $@
known_errors.inc:
-$(BASERUBY) $(srcdir)/tool/generic_erb.rb -c -o $@ $(srcdir)/template/known_errors.inc.tmpl $(srcdir)/defs/known_errors.def
miniprelude.c:
-$(BASERUBY) -I$(srcdir) $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb $@
newline.c:
-$(BASERUBY) "$(srcdir)/tool/transcode-tblgen.rb" -vo newline.c $(srcdir)/enc/trans/newline.trans