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 $(BUILTIN_RB_INCS): $(top_srcdir)/tool/mk_builtin_loader.rb -$(srcdir)/revision.h: -$(srcdir)/revision.h$(gnumake:yes=-nongnumake): - $(Q)$(RM) $(@F) - $(NULLCMD) > $(@F) +$(srcdir)/revision.h: $(REVISION_H) -revision.tmp:: - $(Q) $(NULLCMD) > $@ -revision.$(HAVE_BASERUBY:yes=tmp):: $(srcdir)/version.h $(tooldir)/file2lastrev.rb $(REVISION_FORCE) +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: \ $(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 -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