diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-01-05 15:13:10 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-01-05 15:16:29 +0900 |
commit | ee6e4d63df91d41b35948bc8d4ab2457270c71e2 (patch) | |
tree | 6c8d8af1593eeae2e1c7d6cdfc68de6ec0c6f465 /defs | |
parent | b496578758faa67490cf196b70e7cfbfd2ff7f3d (diff) |
Extract only one revision in header [ci skip]
Both of `$(srcdir)/revision.h` and `revision.h` exist because they are
the same file when in-place build.
Diffstat (limited to 'defs')
-rw-r--r-- | defs/gmake.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/defs/gmake.mk b/defs/gmake.mk index ec70c16a57..51827ad142 100644 --- a/defs/gmake.mk +++ b/defs/gmake.mk @@ -396,7 +396,7 @@ REVISION_LATEST := $(shell $(CHDIR) $(srcdir) && $(GIT) log -1 --format=%H 2>/de else REVISION_LATEST := update endif -REVISION_IN_HEADER := $(shell sed -n 's/^\#define RUBY_FULL_REVISION "\(.*\)"/\1/p' $(wildcard $(srcdir)/revision.h revision.h) /dev/null 2>/dev/null) +REVISION_IN_HEADER := $(shell sed '/^\#define RUBY_FULL_REVISION "\(.*\)"/!d;s//\1/;q' $(wildcard $(srcdir)/revision.h revision.h) /dev/null 2>/dev/null) ifeq ($(REVISION_IN_HEADER),) REVISION_IN_HEADER := none endif |