1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Needs to update revision.h unless existing [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2021-12-02 12:20:53 +09:00
parent fe1725236c
commit a7d0c2c448
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -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.