diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-04-10 11:39:45 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-04-10 11:54:40 +0900 |
commit | 0a93a3f4c63f025c47caf02c62f3d684ec456603 (patch) | |
tree | 81c764ff59dd4730d7dcef16a2ab53e0fd8590fd | |
parent | 836da24e97d9443ffb75abbb35ced3ce52e8242f (diff) | |
download | ruby-0a93a3f4c63f025c47caf02c62f3d684ec456603.tar.gz |
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.
-rw-r--r-- | win32/setup.mak | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/win32/setup.mak b/win32/setup.mak index fa8d2261f4..0f6b26d53a 100644 --- a/win32/setup.mak +++ b/win32/setup.mak @@ -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 |