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

ruby-changes:58876

From: Nobuyoshi <ko1@a...>
Date: Thu, 21 Nov 2019 10:58:18 +0900 (JST)
Subject: [ruby-changes:58876] 97a5af62a3 (master): Skip updating revision.h when the revision is unchanged

https://git.ruby-lang.org/ruby.git/commit/?id=97a5af62a3

From 97a5af62a318fcd93a4e5e4428d576c0280ddbae Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 21 Nov 2019 10:57:36 +0900
Subject: Skip updating revision.h when the revision is unchanged

note: GNU make only.

diff --git a/defs/gmake.mk b/defs/gmake.mk
index cecc212..0a60a83 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -291,9 +291,13 @@ $(UNICODE_SRC_DATA_DIR)/.unicode-tables.time: \ https://github.com/ruby/ruby/blob/trunk/defs/gmake.mk#L291
 	$(UNICODE_FILES) $(UNICODE_PROPERTY_FILES)
 endif
 
+REVISION_IN_HEADER := $(shell sed -n 's/^\#define RUBY_FULL_REVISION "\(.*\)"/\1/p' $(srcdir)/revision.h)
+REVISION_LATEST := $(shell git -C $(srcdir) log -1 --format=%H)
+ifneq ($(REVISION_IN_HEADER),$(REVISION_LATEST))
 # GNU make treat the target as unmodified when its dependents get
 # updated but it is not updated, while others may not.
 $(srcdir)/revision.h: $(REVISION_H)
+endif
 
 # Query on the generated rdoc
 #
-- 
cgit v0.10.2


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

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