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

gmake.mk: force updating revision.h

Since `.revision.time` recipe needs `$(BASERUBY)`, it should not
try to get updated unconditionally, or tarballs fail to build on
environments where BASERUBY is not available.

All developers who build frequently use GNU make anyway, don't
you?

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-11-13 03:24:18 +00:00
parent bad98efefe
commit 45295303ac
3 changed files with 13 additions and 3 deletions

View file

@ -1052,7 +1052,7 @@ preludes: {$(srcdir)}golf_prelude.c
$(srcdir)/revision.h:
@exit > $@
$(REVISION_H): $(srcdir)/version.h $(srcdir)/tool/file2lastrev.rb PHONY
$(REVISION_H): $(srcdir)/version.h $(srcdir)/tool/file2lastrev.rb $(REVISION_FORCE)
-$(Q) $(BASERUBY) $(srcdir)/tool/file2lastrev.rb -q --revision.h "$(srcdir)" > revision.tmp
$(Q)$(IFCHANGE) "--timestamp=$@" "$(srcdir)/revision.h" revision.tmp
@ -1168,7 +1168,7 @@ dist:
up:: update-remote
up::
-$(Q)$(MAKE) $(mflags) Q=$(Q) "$(REVISION_H)"
-$(Q)$(MAKE) $(mflags) Q=$(Q) REVISION_FORCE=PHONY "$(REVISION_H)"
up::
-$(Q)$(MAKE) $(mflags) Q=$(Q) after-update

View file

@ -4,6 +4,10 @@ override gnumake_recursive := $(if $(findstring n,$(firstword $(MFLAGS))),,+)
override mflags := $(filter-out -j%,$(MFLAGS))
MSPECOPT += $(if $(filter -j%,$(MFLAGS)),-j)
ifeq ($(HAVE_BASERUBY),yes)
override REVISION_FORCE := PHONY
endif
CHECK_TARGETS := great exam love check test check% test% btest%
# expand test targets, and those dependents
TEST_TARGETS := $(filter $(CHECK_TARGETS),$(MAKECMDGOALS))
@ -150,7 +154,7 @@ commit: $(if $(filter commit,$(MAKECMDGOALS)),$(filter-out commit,$(MAKECMDGOALS
} | \
$(MAKE) $(mflags) Q=$(Q) srcdir="$(srcdir)" srcs_vpath="$(srcdir)/" CHDIR="$(CHDIR)" \
BOOTSTRAPRUBY="$(BOOTSTRAPRUBY)" MINIRUBY="$(BASERUBY)" BASERUBY="$(BASERUBY)" \
VCSUP="" ENC_MK=.top-enc.mk CONFIGURE="$(CONFIGURE)" -f - \
VCSUP="" ENC_MK=.top-enc.mk REVISION_FORCE=PHONY CONFIGURE="$(CONFIGURE)" -f - \
update-src srcs all-incs
ifeq ($(words $(filter update-gems extract-gems,$(MAKECMDGOALS))),2)

View file

@ -14,6 +14,12 @@ PWD = $(MAKEDIR)
MFLAGS=-l
!endif
!ifndef REVISION_FORCE
!if "$(HAVE_BASERUBY)" == "yes"
REVISION_FORCE = PHONY
!endif
!endif
!ifndef CROSS_COMPILING
CROSS_COMPILING = no
!endif