aboutsummaryrefslogtreecommitdiffstats
path: root/win32
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-09 01:44:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-09 01:44:56 +0000
commit0d45edc535111213abe41c52479e59609e0558c3 (patch)
tree408fa36ed4415ba9d1eaafe84985614477f99029 /win32
parent9bccfa44bda08a3bb2d1740db439e2628243d737 (diff)
downloadruby-0d45edc535111213abe41c52479e59609e0558c3.tar.gz
RUBY_PROGRAM_VERSION from RUBY_VERSION
* configure.in, win32/setup.mak: extract RUBY_PROGRAM_VERSION from RUBY_VERSION in version.h instead of RUBY_API_VERSION numbers in include/ruby/version.h, and cut it into version numbers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r--win32/Makefile.sub9
-rw-r--r--win32/setup.mak17
2 files changed, 16 insertions, 10 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 85093a7c00..336e56af3b 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -24,6 +24,10 @@ LARGEFILE_SUPPORT = 1
win_srcdir = $(srcdir)/win32
!endif
+!if exist(verconf.mk)
+! include verconf.mk
+!endif
+
#### Start of system configuration section. ####
!if defined(pathlist)
@@ -424,9 +428,6 @@ PRELUDE_C = prelude.c
RBCONFIG = ./.rbconfig.time
!include $(srcdir)/common.mk
-!if exist(verconf.mk)
-! include verconf.mk
-!endif
!ifdef SCRIPTPROGRAMS
!else if [echo>scriptbin.mk SCRIPTPROGRAMS = \]
@@ -926,7 +927,7 @@ s,@sitearchincludedir@,$${includedir}/$${sitearch},;t t
s,@arch@,$(ARCH)-$(PLATFORM),;t t
s,@sitearch@,$(ARCH)-$(RT),;t t
s,@ruby_version@,$(ruby_version),;t t
-s,@RUBY_PROGRAM_VERSION@,$(ruby_version),;t t
+s,@RUBY_PROGRAM_VERSION@,$(RUBY_PROGRAM_VERSION),;t t
s,@rubylibprefix@,$${prefix}/lib/$${RUBY_BASE_NAME},;t t
s,@rubyarchdir@,$${rubylibdir}/$${arch},;t t
s,@rubylibdir@,$${rubylibprefix}/$${ruby_version},;t t
diff --git a/win32/setup.mak b/win32/setup.mak
index 8c00710f44..292dab7383 100644
--- a/win32/setup.mak
+++ b/win32/setup.mak
@@ -118,12 +118,6 @@ int main(void) {return (EnumProcesses(NULL,0,NULL) ? 0 : 1);}
-version-: nul verconf.mk
@$(APPEND)
@$(CPP) -I$(srcdir) -I$(srcdir)/include <<"Creating $(MAKEFILE)" | findstr "=" >>$(MAKEFILE)
-#define RUBY_REVISION 0
-#include "version.h"
-MAJOR = RUBY_API_VERSION_MAJOR
-MINOR = RUBY_API_VERSION_MINOR
-TEENY = RUBY_API_VERSION_TEENY
-RUBY_PROGRAM_VERSION = RUBY_VERSION
MSC_VER = _MSC_VER
<<
@@ -135,8 +129,19 @@ verconf.mk: nul
#define STRINGIZE(x) STRINGIZE0(x)
#include "version.h"
for %%I in (RUBY_RELEASE_DATE) do set ruby_release_date=%%~I
+for %%I in (RUBY_VERSION) do set ruby_version=%%~I
+for /f "delims=. tokens=1-3" %%I in (RUBY_VERSION) do (
+ set major=%%I
+ set minor=%%J
+ set teeny=%%K
+)
#undef RUBY_RELEASE_DATE
+#undef RUBY_PROGRAM_VERSION
echo RUBY_RELEASE_DATE = %ruby_release_date:""=%
+echo RUBY_PROGRAM_VERSION = %ruby_version:""=%
+echo MAJOR = %major%
+echo MINOR = %minor%
+echo TEENY = %teeny%
del %0 & exit
<<