[前][次][番号順一覧][スレッド一覧]

ruby-changes:65829

From: Nobuyoshi <ko1@a...>
Date: Sat, 10 Apr 2021 11:56:39 +0900 (JST)
Subject: [ruby-changes:65829] 0a93a3f4c6 (master): win32: fix RUBY_RELEASE_DATE in Makefile

https://git.ruby-lang.org/ruby.git/commit/?id=0a93a3f4c6

From 0a93a3f4c63f025c47caf02c62f3d684ec456603 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sat, 10 Apr 2021 11:39:45 +0900
Subject: 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.
---
 win32/setup.mak | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/win32/setup.mak b/win32/setup.mak
index fa8d226..0f6b26d 100644
--- a/win32/setup.mak
+++ b/win32/setup.mak
@@ -140,9 +140,17 @@ verconf.mk: nul https://github.com/ruby/ruby/blob/trunk/win32/setup.mak#L140
 #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
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]