mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Always generate non-empty revision.h
Non-GNU make seems to generate empty revision.h, but it doesn't make sense since https://github.com/ruby/ruby/pull/6382. Also the $(HAVE_BASERUBY:yes=tmp) hack doesn't seem to be working on OpenBSD. I'll remove it to focus on fixing RubyCI first, and then deal with baseruby-missing environments. At least a snapshot should have revision.h and it might work fine though.
This commit is contained in:
parent
922e61fcc2
commit
39f91bc24b
3 changed files with 2 additions and 22 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue