summaryrefslogtreecommitdiff
path: root/defs
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-12-02 12:20:53 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-12-02 12:28:49 +0900
commita7d0c2c4489f94a0087646040afccb66cec4e7d7 (patch)
tree20270579df3511b51a9d0153208a43a6dd8c2d8e /defs
parentfe1725236c8a4d6cb780874c470f7f443185ed38 (diff)
Needs to update revision.h unless existing [ci skip]
Diffstat (limited to 'defs')
-rw-r--r--defs/gmake.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/defs/gmake.mk b/defs/gmake.mk
index dd25897054..1a6c8620ed 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -338,8 +338,13 @@ $(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.