Skip to content

Commit

Permalink
Extract only one revision in header [ci skip]
Browse files Browse the repository at this point in the history
Both of `$(srcdir)/revision.h` and `revision.h` exist because they are
the same file when in-place build.
  • Loading branch information
nobu committed Jan 5, 2023
1 parent b496578 commit ee6e4d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion defs/gmake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ee6e4d6

Please sign in to comment.