mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
RUBY_RELEASE_DATE in verconf.mk
* win32/setup.mak (verconf.mk): extract RUBY_RELEASE_DATE without quotation marks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
34b1c7ddd6
commit
1fbfa7180b
2 changed files with 11 additions and 13 deletions
|
@ -12,15 +12,15 @@
|
|||
#define TOKEN_PASTE(x,y) x##y
|
||||
#endif
|
||||
#define ONLY_ONE_DIGIT(x) TOKEN_PASTE(10,x) < 1000
|
||||
#define ZERO_STR "0"
|
||||
#define WITH_ZERO_PADDING(x) TOKEN_PASTE(0,x)
|
||||
#define RUBY_RELEASE_YEAR_STR STRINGIZE(RUBY_RELEASE_YEAR)
|
||||
#if ONLY_ONE_DIGIT(RUBY_RELEASE_MONTH)
|
||||
#define RUBY_RELEASE_MONTH_STR ZERO_STR STRINGIZE(RUBY_RELEASE_MONTH)
|
||||
#define RUBY_RELEASE_MONTH_STR STRINGIZE(WITH_ZERO_PADDING(RUBY_RELEASE_MONTH))
|
||||
#else
|
||||
#define RUBY_RELEASE_MONTH_STR STRINGIZE(RUBY_RELEASE_MONTH)
|
||||
#endif
|
||||
#if ONLY_ONE_DIGIT(RUBY_RELEASE_DAY)
|
||||
#define RUBY_RELEASE_DAY_STR ZERO_STR STRINGIZE(RUBY_RELEASE_DAY)
|
||||
#define RUBY_RELEASE_DAY_STR STRINGIZE(WITH_ZERO_PADDING(RUBY_RELEASE_DAY))
|
||||
#else
|
||||
#define RUBY_RELEASE_DAY_STR STRINGIZE(RUBY_RELEASE_DAY)
|
||||
#endif
|
||||
|
|
|
@ -128,18 +128,16 @@ MSC_VER = _MSC_VER
|
|||
<<
|
||||
|
||||
verconf.mk: nul
|
||||
@$(CPP) -I$(srcdir) -I$(srcdir)/include <<"Creating $(@)" | findstr "=" >$(@)
|
||||
@$(CPP) -I$(srcdir) -I$(srcdir)/include <<"Creating $(@)" > $(*F).bat && cmd /c $(*F).bat > $(@)
|
||||
@echo off
|
||||
#define RUBY_REVISION 0
|
||||
#define STRINGIZE0(expr) #expr
|
||||
#define STRINGIZE(x) STRINGIZE0(x)
|
||||
#include "version.h"
|
||||
release_year = RUBY_RELEASE_YEAR
|
||||
release_month = RUBY_RELEASE_MONTH
|
||||
release_day = RUBY_RELEASE_DAY
|
||||
#undef RUBY_RELEASE_YEAR
|
||||
#undef RUBY_RELEASE_MONTH
|
||||
#undef RUBY_RELEASE_DAY
|
||||
RUBY_RELEASE_YEAR = $$(release_year)
|
||||
RUBY_RELEASE_MONTH = $$(release_month)
|
||||
RUBY_RELEASE_DAY = $$(release_day)
|
||||
for %%I in (RUBY_RELEASE_DATE) do set ruby_release_date=%%~I
|
||||
#undef RUBY_RELEASE_DATE
|
||||
echo RUBY_RELEASE_DATE = %ruby_release_date:""=%
|
||||
del %0 & exit
|
||||
<<
|
||||
|
||||
-program-name-:
|
||||
|
|
Loading…
Reference in a new issue