Win32: Refactor configurations
Pass configure options to the generated Makefile as-is.
This commit is contained in:
parent
a687b2eced
commit
a3bfddf96f
@ -190,9 +190,6 @@ ruby_version = $(MAJOR).$(MINOR).0
|
|||||||
!if defined(ABI_VERSION)
|
!if defined(ABI_VERSION)
|
||||||
ruby_version = $(ruby_version)+$(ABI_VERSION)
|
ruby_version = $(ruby_version)+$(ABI_VERSION)
|
||||||
!endif
|
!endif
|
||||||
!if !defined(RUBY_VERSION_NAME)
|
|
||||||
RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
|
|
||||||
!endif
|
|
||||||
RUBY_PROGRAM_VERSION = $(MAJOR).$(MINOR).$(TEENY)
|
RUBY_PROGRAM_VERSION = $(MAJOR).$(MINOR).$(TEENY)
|
||||||
|
|
||||||
!ifndef RUBY_SO_NAME
|
!ifndef RUBY_SO_NAME
|
||||||
@ -1131,6 +1128,11 @@ s,@TEENY@,$(TEENY),;t t
|
|||||||
s,@ruby_version@,$(ruby_version),;t t
|
s,@ruby_version@,$(ruby_version),;t t
|
||||||
s,@RUBY_PROGRAM_VERSION@,$$(MAJOR).$$(MINOR).$$(TEENY),;t t
|
s,@RUBY_PROGRAM_VERSION@,$$(MAJOR).$$(MINOR).$$(TEENY),;t t
|
||||||
s,@RUBY_API_VERSION@,$$(MAJOR).$$(MINOR),;t t
|
s,@RUBY_API_VERSION@,$$(MAJOR).$$(MINOR),;t t
|
||||||
|
!if defined(RUBY_VERSION_NAME)
|
||||||
|
s,@RUBY_VERSION_NAME@,$(RUBY_VERSION_NAME),;t t
|
||||||
|
!else
|
||||||
|
s,@RUBY_VERSION_NAME@,$$(RUBY_BASE_NAME)-$$(ruby_version),;t t
|
||||||
|
!endif
|
||||||
s,@rubylibprefix@,$${prefix}/lib/$${RUBY_BASE_NAME},;t t
|
s,@rubylibprefix@,$${prefix}/lib/$${RUBY_BASE_NAME},;t t
|
||||||
s,@rubyarchdir@,$${rubylibdir}/$${arch},;t t
|
s,@rubyarchdir@,$${rubylibdir}/$${arch},;t t
|
||||||
s,@rubylibdir@,$${rubylibprefix}/$${ruby_version},;t t
|
s,@rubylibdir@,$${rubylibprefix}/$${ruby_version},;t t
|
||||||
@ -1140,7 +1142,7 @@ s,@sitelibdir@,$${sitedir}/$${ruby_version},;t t
|
|||||||
s,@vendordir@,$${rubylibprefix}/vendor_ruby,;t t
|
s,@vendordir@,$${rubylibprefix}/vendor_ruby,;t t
|
||||||
s,@vendorarchdir@,$${vendorlibdir}/$${sitearch},;t t
|
s,@vendorarchdir@,$${vendorlibdir}/$${sitearch},;t t
|
||||||
s,@vendorlibdir@,$${vendordir}/$${ruby_version},;t t
|
s,@vendorlibdir@,$${vendordir}/$${ruby_version},;t t
|
||||||
s,@rubyhdrdir@,$$(includedir)/$${RUBY_BASE_NAME}-$$(ruby_version),;t t
|
s,@rubyhdrdir@,$$(includedir)/$$(RUBY_VERSION_NAME),;t t
|
||||||
s,@sitehdrdir@,$$(rubyhdrdir)/site_ruby,;t t
|
s,@sitehdrdir@,$$(rubyhdrdir)/site_ruby,;t t
|
||||||
s,@vendorhdrdir@,$$(rubyhdrdir)/vendor_ruby,;t t
|
s,@vendorhdrdir@,$$(rubyhdrdir)/vendor_ruby,;t t
|
||||||
s,@rubyarchhdrdir@,$$(rubyhdrdir)/$${arch},;t t
|
s,@rubyarchhdrdir@,$$(rubyhdrdir)/$${arch},;t t
|
||||||
|
@ -10,13 +10,16 @@ for %%I in (%0) do if /%%~dpI/ == /%CD%\/ (
|
|||||||
set XINCFLAGS=
|
set XINCFLAGS=
|
||||||
set XLDFLAGS=
|
set XLDFLAGS=
|
||||||
|
|
||||||
echo> ~tmp~.mak ####
|
set conf=%0
|
||||||
echo>> ~tmp~.mak conf = %0
|
set pathlist=
|
||||||
echo>> ~tmp~.mak $(conf): nul
|
set config_make=confargs~%RANDOM%.mak
|
||||||
echo>> ~tmp~.mak @del ~setup~.mak
|
set confargs=%config_make:.mak=.c%
|
||||||
echo>> ~tmp~.mak @$(MAKE) -l$(MAKEFLAGS) -f $(@D)/setup.mak \
|
echo>%config_make% # CONFIGURE
|
||||||
if exist pathlist.tmp del pathlist.tmp
|
(
|
||||||
echo>confargs.tmp #define CONFIGURE_ARGS \
|
echo #define $ $$ //
|
||||||
|
echo !ifndef CONFIGURE_ARGS
|
||||||
|
echo #define CONFIGURE_ARGS \
|
||||||
|
) >%confargs%
|
||||||
:loop
|
:loop
|
||||||
set opt=%1
|
set opt=%1
|
||||||
if "%1" == "" goto :end
|
if "%1" == "" goto :end
|
||||||
@ -28,6 +31,7 @@ if "%1" == "target" goto :target
|
|||||||
if "%1" == "--with-static-linked-ext" goto :extstatic
|
if "%1" == "--with-static-linked-ext" goto :extstatic
|
||||||
if "%1" == "--program-prefix" goto :pprefix
|
if "%1" == "--program-prefix" goto :pprefix
|
||||||
if "%1" == "--program-suffix" goto :suffix
|
if "%1" == "--program-suffix" goto :suffix
|
||||||
|
if "%1" == "--program-transform-name" goto :transform_name
|
||||||
if "%1" == "--program-name" goto :installname
|
if "%1" == "--program-name" goto :installname
|
||||||
if "%1" == "--install-name" goto :installname
|
if "%1" == "--install-name" goto :installname
|
||||||
if "%1" == "--so-name" goto :soname
|
if "%1" == "--so-name" goto :soname
|
||||||
@ -59,166 +63,170 @@ if "%opt:~0,7%" == "--with-" goto :witharg
|
|||||||
if "%1" == "-h" goto :help
|
if "%1" == "-h" goto :help
|
||||||
if "%1" == "--help" goto :help
|
if "%1" == "--help" goto :help
|
||||||
if "%opt:~0,1%" == "-" (
|
if "%opt:~0,1%" == "-" (
|
||||||
echo>>confargs.tmp %1 \
|
echo>>%confargs% %1 \
|
||||||
set witharg=
|
set witharg=
|
||||||
) else if "%witharg%" == "" (
|
) else if "%witharg%" == "" (
|
||||||
echo>>confargs.tmp %1 \
|
echo>>%confargs% %1 \
|
||||||
) else (
|
) else (
|
||||||
echo>>confargs.tmp ,%1\
|
echo>>%confargs% ,%1\
|
||||||
)
|
)
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:srcdir
|
:srcdir
|
||||||
echo>> ~tmp~.mak "srcdir=%~2" \
|
echo>> %config_make% srcdir = %~2
|
||||||
echo>>confargs.tmp --srcdir=%2 \
|
echo>>%confargs% --srcdir=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:prefix
|
:prefix
|
||||||
echo>> ~tmp~.mak "prefix=%~2" \
|
echo>> %config_make% prefix = %~2
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>%confargs% %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:pprefix
|
:pprefix
|
||||||
echo>> ~tmp~.mak "PROGRAM_PREFIX=%~2" \
|
echo>> %config_make% PROGRAM_PREFIX = %~2
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>%confargs% %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:suffix
|
:suffix
|
||||||
echo>> ~tmp~.mak "PROGRAM_SUFFIX=%~2" \
|
echo>> %config_make% PROGRAM_SUFFIX = %~2
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>%confargs% %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:installname
|
:installname
|
||||||
echo>> ~tmp~.mak "RUBY_INSTALL_NAME=%~2" \
|
echo>> %config_make% RUBY_INSTALL_NAME = %~2
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>%confargs% %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:soname
|
:soname
|
||||||
echo>> ~tmp~.mak "RUBY_SO_NAME=%~2" \
|
echo>> %config_make% RUBY_SO_NAME = %~2
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>%confargs% %1=%2 \
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
goto :loop ;
|
||||||
|
:transform_name
|
||||||
|
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:target
|
:target
|
||||||
echo>> ~tmp~.mak "%~2" \
|
echo>> %config_make% target = %~2
|
||||||
echo>>confargs.tmp --target=%2 \
|
echo>>%confargs% --target=%2 \
|
||||||
if NOT "%~2" == "x64-mswin64" goto target3
|
if "%~2" == "x64-mswin64" (
|
||||||
:target2
|
echo>> %config_make% TARGET_OS = mswin64
|
||||||
echo>> ~tmp~.mak "TARGET_OS=mswin64" \
|
)
|
||||||
:target3
|
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:extstatic
|
:extstatic
|
||||||
echo>> ~tmp~.mak "EXTSTATIC=static" \
|
echo>> %config_make% EXTSTATIC = static
|
||||||
echo>>confargs.tmp %1 \
|
echo>>%confargs% %1 \
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:enable-rdoc
|
:enable-rdoc
|
||||||
echo>> ~tmp~.mak "RDOCTARGET=rdoc" \
|
echo>> %config_make% RDOCTARGET = rdoc
|
||||||
echo>>confargs.tmp %1 \
|
echo>>%confargs% %1 \
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:disable-rdoc
|
:disable-rdoc
|
||||||
echo>> ~tmp~.mak "RDOCTARGET=nodoc" \
|
echo>> %config_make% RDOCTARGET = nodoc
|
||||||
echo>>confargs.tmp %1 \
|
echo>>%confargs% %1 \
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:enable-lib
|
:enable-lib
|
||||||
echo>> ~tmp~.mak "INSTALL_STATIC_LIBRARY=yes" \
|
echo>> %config_make% INSTALL_STATIC_LIBRARY = yes
|
||||||
echo>>confargs.tmp %1 \
|
echo>>%confargs% %1 \
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:disable-lib
|
:disable-lib
|
||||||
echo>> ~tmp~.mak "INSTALL_STATIC_LIBRARY=no" \
|
echo>> %config_make% INSTALL_STATIC_LIBRARY = no
|
||||||
echo>>confargs.tmp %1 \
|
echo>>%confargs% %1 \
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:enable-debug-env
|
:enable-debug-env
|
||||||
echo>> ~tmp~.mak "ENABLE_DEBUG_ENV=yes" \
|
echo>> %config_make% ENABLE_DEBUG_ENV = yes
|
||||||
echo>>confargs.tmp %1 \
|
echo>>%confargs% %1 \
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:disable-debug-env
|
:disable-debug-env
|
||||||
echo>> ~tmp~.mak "ENABLE_DEBUG_ENV=no" \
|
echo>> %config_make% ENABLE_DEBUG_ENV = no
|
||||||
echo>>confargs.tmp %1 \
|
echo>>%confargs% %1 \
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:enable-devel
|
:enable-devel
|
||||||
echo>> ~tmp~.mak "RUBY_DEVEL=yes" \
|
echo>> %config_make% RUBY_DEVEL = yes
|
||||||
echo>>confargs.tmp %1 \
|
echo>>%confargs% %1 \
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:disable-devel
|
:disable-devel
|
||||||
echo>> ~tmp~.mak "RUBY_DEVEL=no" \
|
echo>> %config_make% RUBY_DEVEL = no
|
||||||
echo>>confargs.tmp %1 \
|
echo>>%confargs% %1 \
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:enable-rubygems
|
:enable-rubygems
|
||||||
echo>> ~tmp~.mak "USE_RUBYGEMS=yes" \
|
echo>> %config_make% USE_RUBYGEMS = yes
|
||||||
echo>>confargs.tmp %1 \
|
echo>>%confargs% %1 \
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:disable-rubygems
|
:disable-rubygems
|
||||||
echo>> ~tmp~.mak "USE_RUBYGEMS=no" \
|
echo>> %config_make% USE_RUBYGEMS = no
|
||||||
echo>>confargs.tmp %1 \
|
echo>>%confargs% %1 \
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:ntver
|
:ntver
|
||||||
echo>> ~tmp~.mak "NTVER=%~2" \
|
echo>> %config_make% NTVER = %~2
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>%confargs% %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:extout
|
:extout
|
||||||
echo>> ~tmp~.mak "EXTOUT=%~2" \
|
if not "%~2" == ".ext" (echo>> %config_make% EXTOUT = %~2)
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>%confargs% %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:path
|
:path
|
||||||
echo>>pathlist.tmp %~2;\
|
set pathlist=%pathlist%%~2;
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>%confargs% %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:baseruby
|
:baseruby
|
||||||
echo>> ~tmp~.mak "BASERUBY=%~2" \
|
echo>> %config_make% BASERUBY = %~2
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>%confargs% %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:nobaseruby
|
:nobaseruby
|
||||||
echo>> ~tmp~.mak "HAVE_BASERUBY=no" \
|
echo>> %config_make% HAVE_BASERUBY = no
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>%confargs% %1=%2 \
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:libdir
|
:libdir
|
||||||
echo>> ~tmp~.mak "libdir_basename=%~2" \
|
echo>> %config_make% libdir_basename = %~2
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>%confargs% %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:git
|
:git
|
||||||
echo>> ~tmp~.mak "GIT=%~2" \
|
echo>> %config_make% GIT = %~2
|
||||||
echo>>confargs.tmp %1=%2 \
|
echo>>%confargs% %1=%2 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:nogit
|
:nogit
|
||||||
echo>> ~tmp~.mak "GIT=never-use" \
|
echo>> %config_make% GIT = never-use
|
||||||
echo>> ~tmp~.mak "HAVE_GIT=no" \
|
echo>> %config_make% HAVE_GIT = no
|
||||||
echo>>confargs.tmp %1 \
|
echo>>%confargs% %1 \
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:gmp
|
:gmp
|
||||||
echo>> ~tmp~.mak "WITH_GMP=yes" \
|
echo>> %config_make% WITH_GMP = yes
|
||||||
echo>>confargs.tmp %1=1 \
|
echo>>%confargs% %1=1 \
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
@ -233,13 +241,13 @@ goto :loop ;
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
:witharg
|
:witharg
|
||||||
echo>>confargs.tmp %1=%2\
|
echo>>%confargs% %1=%2\
|
||||||
set witharg=1
|
set witharg=1
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:withoutarg
|
:withoutarg
|
||||||
echo>>confargs.tmp %1 \
|
echo>>%confargs% %1 \
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
:help
|
:help
|
||||||
@ -259,35 +267,41 @@ goto :loop ;
|
|||||||
echo --disable-install-doc do not install rdoc indexes during install
|
echo --disable-install-doc do not install rdoc indexes during install
|
||||||
echo --with-ntver=0xXXXX target NT version (shouldn't use with old SDK)
|
echo --with-ntver=0xXXXX target NT version (shouldn't use with old SDK)
|
||||||
echo Note that `,' and `;' need to be enclosed within double quotes in batch file command line.
|
echo Note that `,' and `;' need to be enclosed within double quotes in batch file command line.
|
||||||
del *.tmp
|
del %confargs% %config_make%
|
||||||
del ~tmp~.mak
|
|
||||||
goto :exit
|
goto :exit
|
||||||
:end
|
:end
|
||||||
echo>> ~tmp~.mak WIN32DIR=$(@D:\=/)
|
(
|
||||||
echo.>>confargs.tmp
|
echo //
|
||||||
echo>confargs.c #define $ $$ //
|
echo configure_args = CONFIGURE_ARGS
|
||||||
echo>>confargs.c !ifndef CONFIGURE_ARGS
|
echo !endif
|
||||||
type>>confargs.c confargs.tmp
|
echo #undef $
|
||||||
echo>>confargs.c configure_args = CONFIGURE_ARGS
|
) >> %confargs%
|
||||||
echo>>confargs.c !endif
|
(
|
||||||
echo>>confargs.c #undef $
|
cl -EP %confargs% 2>nul | findstr "! ="
|
||||||
if exist pathlist.tmp echo>>confargs.c #define PATH_LIST \
|
echo.
|
||||||
if exist pathlist.tmp type>>confargs.c pathlist.tmp
|
if NOT "%XINCFLAGS%" == "" echo XINCFLAGS = %XINCFLAGS%
|
||||||
if exist pathlist.tmp echo.>>confargs.c
|
if NOT "%XLDFLAGS%" == "" echo XLDFLAGS = %XLDFLAGS%
|
||||||
if exist pathlist.tmp echo>>confargs.c pathlist = PATH_LIST
|
if NOT "%pathlist%" == "" (
|
||||||
cl -EP confargs.c > ~setup~.mak 2>nul
|
call echo PATH = %%pathlist:;=/bin;%%$^(PATH^)
|
||||||
if exist pathlist.tmp echo>>~setup~.mak PATH = $(pathlist:;=/bin;)$(PATH)
|
call echo INCLUDE = %%pathlist:;=/include;%%$^(INCLUDE^)
|
||||||
if exist pathlist.tmp echo>>~setup~.mak INCLUDE = $(pathlist:;=/include;)
|
call echo LIB = %%pathlist:;=/lib;%%$^(LIB^)
|
||||||
if exist pathlist.tmp echo>>~setup~.mak LIB = $(pathlist:;=/lib;)
|
)
|
||||||
echo>>~setup~.mak XINCFLAGS = %XINCFLAGS%
|
) >> %config_make%
|
||||||
echo>>~setup~.mak XLDFLAGS = %XLDFLAGS%
|
del %confargs% > nul
|
||||||
type>>~setup~.mak ~tmp~.mak
|
|
||||||
del *.tmp > nul
|
set setup_make=%config_make:confargs=setup%
|
||||||
del ~tmp~.mak > nul
|
(
|
||||||
echo>>~setup~.mak @if exist Makefile.old del Makefile.old
|
echo #### -*- makefile -*-
|
||||||
echo>>~setup~.mak @if exist Makefile ren Makefile Makefile.old
|
echo conf = %conf%
|
||||||
echo>>~setup~.mak @ren Makefile.new Makefile
|
echo $^(conf^): nul
|
||||||
nmake -alf ~setup~.mak MAKEFILE=Makefile.new
|
echo @del %setup_make%
|
||||||
|
echo @$^(MAKE^) -l$^(MAKEFLAGS^) -f $^(@D^)/setup.mak \
|
||||||
|
echo WIN32DIR=$^(@D:\=/^) config_make=%config_make%
|
||||||
|
echo -@move /y Makefile Makefile.old ^> nul 2^> nul
|
||||||
|
echo @ren Makefile.new Makefile
|
||||||
|
) > %setup_make%
|
||||||
|
nmake -alf %setup_make% MAKEFILE=Makefile.new
|
||||||
|
|
||||||
exit /b %ERRORLEVEL%
|
exit /b %ERRORLEVEL%
|
||||||
:exit
|
:exit
|
||||||
@endlocal
|
@endlocal
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# -*- makefile -*-
|
# -*- makefile -*-
|
||||||
|
|
||||||
|
!include $(config_make)
|
||||||
|
|
||||||
!if "$(srcdir)" != ""
|
!if "$(srcdir)" != ""
|
||||||
WIN32DIR = $(srcdir)/win32
|
WIN32DIR = $(srcdir)/win32
|
||||||
!elseif "$(WIN32DIR)" == "win32"
|
!elseif "$(WIN32DIR)" == "win32"
|
||||||
@ -40,51 +42,13 @@ x64-mswin64: -prologue- -x64- -epilogue-
|
|||||||
MAKE = nmake
|
MAKE = nmake
|
||||||
srcdir = $(srcdir:\=/)
|
srcdir = $(srcdir:\=/)
|
||||||
prefix = $(prefix:\=/)
|
prefix = $(prefix:\=/)
|
||||||
!if defined(libdir_basename)
|
|
||||||
libdir_basename = $(libdir_basename)
|
|
||||||
!endif
|
|
||||||
EXTSTATIC = $(EXTSTATIC)
|
|
||||||
!if defined(RDOCTARGET)
|
|
||||||
RDOCTARGET = $(RDOCTARGET)
|
|
||||||
!endif
|
|
||||||
!if defined(EXTOUT) && "$(EXTOUT)" != ".ext"
|
|
||||||
EXTOUT = $(EXTOUT)
|
|
||||||
!endif
|
|
||||||
!if defined(NTVER)
|
|
||||||
NTVER = $(NTVER)
|
|
||||||
!endif
|
|
||||||
!if defined(USE_RUBYGEMS)
|
|
||||||
USE_RUBYGEMS = $(USE_RUBYGEMS)
|
|
||||||
!endif
|
|
||||||
!if defined(ENABLE_DEBUG_ENV)
|
|
||||||
ENABLE_DEBUG_ENV = $(ENABLE_DEBUG_ENV)
|
|
||||||
!endif
|
|
||||||
!if defined(RJIT_SUPPORT)
|
|
||||||
RJIT_SUPPORT = $(RJIT_SUPPORT)
|
|
||||||
!endif
|
|
||||||
!if defined(XINCFLAGS)
|
|
||||||
CPPFLAGS = $(XINCFLAGS)
|
|
||||||
!endif
|
|
||||||
!if defined(XLDFLAGS)
|
|
||||||
XLDFLAGS = $(XLDFLAGS)
|
|
||||||
!endif
|
|
||||||
|
|
||||||
# TOOLS
|
|
||||||
<<
|
<<
|
||||||
|
@type $(config_make) >>$(MAKEFILE)
|
||||||
|
@del $(config_make) > nul
|
||||||
!if defined(BASERUBY)
|
!if defined(BASERUBY)
|
||||||
$(BASERUBY:/=\) "$(srcdir)/tool/missing-baseruby.bat"
|
$(BASERUBY:/=\) "$(srcdir)/tool/missing-baseruby.bat"
|
||||||
@echo BASERUBY = $(BASERUBY:/=\)>> $(MAKEFILE)
|
|
||||||
!endif
|
!endif
|
||||||
!if "$(RUBY_DEVEL)" == "yes"
|
|
||||||
RUBY_DEVEL = yes
|
|
||||||
!endif
|
|
||||||
!if "$(GIT)" != ""
|
|
||||||
@echo GIT = $(GIT)>> $(MAKEFILE)
|
|
||||||
!endif
|
|
||||||
!if "$(HAVE_GIT)" != ""
|
|
||||||
@echo HAVE_GIT = $(HAVE_GIT)>> $(MAKEFILE)
|
|
||||||
!endif
|
|
||||||
|
|
||||||
!if "$(WITH_GMP)" != "no"
|
!if "$(WITH_GMP)" != "no"
|
||||||
@($(CC) $(XINCFLAGS) <<conftest.c -link $(XLDFLAGS) gmp.lib > nul && (echo USE_GMP = yes) || exit /b 0) >>$(MAKEFILE)
|
@($(CC) $(XINCFLAGS) <<conftest.c -link $(XLDFLAGS) gmp.lib > nul && (echo USE_GMP = yes) || exit /b 0) >>$(MAKEFILE)
|
||||||
#include <gmp.h>
|
#include <gmp.h>
|
||||||
@ -235,24 +199,6 @@ set MSC_VER
|
|||||||
del %0 & exit
|
del %0 & exit
|
||||||
<<
|
<<
|
||||||
|
|
||||||
-program-name-:
|
|
||||||
@type << >>$(MAKEFILE)
|
|
||||||
|
|
||||||
# PROGRAM-NAME
|
|
||||||
!ifdef PROGRAM_PREFIX
|
|
||||||
PROGRAM_PREFIX = $(PROGRAM_PREFIX)
|
|
||||||
!endif
|
|
||||||
!ifdef PROGRAM_SUFFIX
|
|
||||||
PROGRAM_SUFFIX = $(PROGRAM_SUFFIX)
|
|
||||||
!endif
|
|
||||||
!ifdef RUBY_INSTALL_NAME
|
|
||||||
RUBY_INSTALL_NAME = $(RUBY_INSTALL_NAME)
|
|
||||||
!endif
|
|
||||||
!ifdef RUBY_SO_NAME
|
|
||||||
RUBY_SO_NAME = $(RUBY_SO_NAME)
|
|
||||||
!endif
|
|
||||||
<<
|
|
||||||
|
|
||||||
-generic-: nul
|
-generic-: nul
|
||||||
@$(CPP) <<conftest.c 2>nul | findstr = >>$(MAKEFILE)
|
@$(CPP) <<conftest.c 2>nul | findstr = >>$(MAKEFILE)
|
||||||
#if defined _M_X64
|
#if defined _M_X64
|
||||||
@ -281,7 +227,7 @@ MACHINE = x86
|
|||||||
-i686-: -ix86-
|
-i686-: -ix86-
|
||||||
@echo $(CPU) = 6>>$(MAKEFILE)
|
@echo $(CPU) = 6>>$(MAKEFILE)
|
||||||
|
|
||||||
-epilogue-: -compiler- -program-name- -encs-
|
-epilogue-: -compiler- -encs-
|
||||||
|
|
||||||
-encs-: nul
|
-encs-: nul
|
||||||
@$(APPEND)
|
@$(APPEND)
|
||||||
@ -289,11 +235,6 @@ MACHINE = x86
|
|||||||
@$(MAKE) -l -f $(srcdir)/win32/enc-setup.mak srcdir="$(srcdir)" MAKEFILE=$(MAKEFILE)
|
@$(MAKE) -l -f $(srcdir)/win32/enc-setup.mak srcdir="$(srcdir)" MAKEFILE=$(MAKEFILE)
|
||||||
|
|
||||||
-epilogue-: nul
|
-epilogue-: nul
|
||||||
!if exist(confargs.c)
|
|
||||||
@$(APPEND)
|
|
||||||
@$(CPP) confargs.c 2>&1 | findstr "! =" >> $(MAKEFILE)
|
|
||||||
@del confargs.c
|
|
||||||
!endif
|
|
||||||
@type << >>$(MAKEFILE)
|
@type << >>$(MAKEFILE)
|
||||||
|
|
||||||
# RUBY_INSTALL_NAME = ruby
|
# RUBY_INSTALL_NAME = ruby
|
||||||
|
Loading…
x
Reference in New Issue
Block a user