win32: fix RUBY_RELEASE_DATE in Makefile

As it is overridden by the definition in common.mk, instead define
YEAR, MONTH and DAY which are used there.

This macro is useful for daily build&installation by the
combination with "relative-load", for example:
```sh
$ ./configure --prefix=/. --enable-load-relative \
  --with-destdir='$(HOME)/.rbenv/versions/$(RUBY_RELEASE_DATE)'
```
This can install images usable by rbenv per days.
This commit is contained in:
Nobuyoshi Nakada 2021-04-10 11:39:45 +09:00
Родитель 836da24e97
Коммит 0a93a3f4c6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7CD2805BFA3770C6
1 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@ -140,9 +140,17 @@ verconf.mk: nul
#define STRINGIZE0(expr) #expr
#define STRINGIZE(x) STRINGIZE0(x)
#include "version.h"
for %%I in (RUBY_RELEASE_DATE) do set ruby_release_date=%%~I
#undef RUBY_RELEASE_DATE
echo RUBY_RELEASE_DATE = %ruby_release_date:""=%
set ruby_release_year=RUBY_RELEASE_YEAR
set ruby_release_month=RUBY_RELEASE_MONTH
set ruby_release_day=RUBY_RELEASE_DAY
set ruby_release_month=0%ruby_release_month%
set ruby_release_day=0%ruby_release_day%
#undef RUBY_RELEASE_YEAR
#undef RUBY_RELEASE_MONTH
#undef RUBY_RELEASE_DAY
echo RUBY_RELEASE_YEAR = %ruby_release_year%
echo RUBY_RELEASE_MONTH = %ruby_release_month:~-2%
echo RUBY_RELEASE_DAY = %ruby_release_day:~-2%
echo MAJOR = RUBY_VERSION_MAJOR
echo MINOR = RUBY_VERSION_MINOR
echo TEENY = RUBY_VERSION_TEENY