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

ruby-changes:73598

From: Takashi <ko1@a...>
Date: Sat, 17 Sep 2022 23:46:53 +0900 (JST)
Subject: [ruby-changes:73598] 39f91bc24b (master): Always generate non-empty revision.h

https://git.ruby-lang.org/ruby.git/commit/?id=39f91bc24b

From 39f91bc24baa37db3c3d1485902056f43b013b54 Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Sat, 17 Sep 2022 23:16:55 +0900
Subject: Always generate non-empty revision.h

Non-GNU make seems to generate empty revision.h, but it doesn't make
sense since https://github.com/ruby/ruby/pull/6382.

Also the $(HAVE_BASERUBY:yes=tmp) hack doesn't seem to be working on
OpenBSD. I'll remove it to focus on fixing RubyCI first, and then deal
with baseruby-missing environments. At least a snapshot should have
revision.h and it might work fine though.
---
 common.mk          | 11 +++--------
 defs/gmake.mk      | 13 -------------
 win32/Makefile.sub |  2 --
 3 files changed, 3 insertions(+), 23 deletions(-)

diff --git a/common.mk b/common.mk
index fb1b785534..90d507806a 100644
--- a/common.mk
+++ b/common.mk
@@ -1211,14 +1211,9 @@ builtin_binary.inc: $(PREP) $(BUILTIN_RB_SRCS) $(srcdir)/template/builtin_binary https://github.com/ruby/ruby/blob/trunk/common.mk#L1211
 
 $(BUILTIN_RB_INCS): $(top_srcdir)/tool/mk_builtin_loader.rb
 
-$(srcdir)/revision.h:
-$(srcdir)/revision.h$(gnumake:yes=-nongnumake):
-	$(Q)$(RM) $(@F)
-	$(NULLCMD) > $(@F)
-
-revision.tmp::
-	$(Q) $(NULLCMD) > $@
-revision.$(HAVE_BASERUBY:yes=tmp):: $(srcdir)/version.h $(tooldir)/file2lastrev.rb $(REVISION_FORCE)
+$(srcdir)/revision.h: $(REVISION_H)
+
+revision.tmp:: $(srcdir)/version.h $(tooldir)/file2lastrev.rb $(REVISION_FORCE)
 	$(Q) $(BASERUBY) $(tooldir)/file2lastrev.rb -q --revision.h --srcdir="$(srcdir)" > $@
 
 $(REVISION_H): revision.tmp
diff --git a/defs/gmake.mk b/defs/gmake.mk
index c593c1c033..cebb181fd1 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -383,19 +383,6 @@ $(UNICODE_SRC_DATA_DIR)/.unicode-tables.time: \ https://github.com/ruby/ruby/blob/trunk/defs/gmake.mk#L383
 	$(UNICODE_FILES) $(UNICODE_PROPERTY_FILES)
 endif
 
-ifeq ($(wildcard $(srcdir)/revision.h),)
-REVISION_IN_HEADER := none
-REVISION_LATEST := update
-else
-REVISION_IN_HEADER := $(shell sed -n 's/^\#define RUBY_FULL_REVISION "\(.*\)"/\1/p' $(srcdir)/revision.h 2>/dev/null)
-REVISION_LATEST := $(shell $(CHDIR) $(srcdir) && $(GIT) log -1 --format=%H 2>/dev/null)
-endif
-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
-
 include $(top_srcdir)/yjit/yjit.mk
 
 # Query on the generated rdoc
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index e802b80968..361af556cd 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -1244,8 +1244,6 @@ $(RCFILES): $(RBCONFIG) $(srcdir)/revision.h $(srcdir)/win32/resource.rb https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L1244
 			-so_name=$(RUBY_SO_NAME) \
 			. $(icondirs) $(win_srcdir)
 
-$(srcdir)/revision.h: $(REVISION_H)
-
 update-benchmark-driver:
 	$(GIT) clone https://github.com/benchmark-driver/benchmark-driver $(srcdir)/benchmark/benchmark-driver || \
 	  $(GIT) -C $(srcdir)/benchmark/benchmark-driver pull origin master
-- 
cgit v1.2.1


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

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