summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-13 03:24:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-13 03:24:18 +0000
commit45295303ac8972796f250a97607e3f854106139d (patch)
tree0f5cc7e3305d56348bbb2cc0d509a0b6f65501cd
parentbad98efefed9a67bfad0f9240b5e6e6b871a4c0f (diff)
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
-rw-r--r--common.mk4
-rw-r--r--defs/gmake.mk6
-rw-r--r--win32/Makefile.sub6
3 files changed, 13 insertions, 3 deletions
diff --git a/common.mk b/common.mk
index a0c9042..28979bc 100644
--- a/common.mk
+++ b/common.mk
@@ -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
diff --git a/defs/gmake.mk b/defs/gmake.mk
index 9807a26..ed6cbf2 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -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)
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index ebbb6d9..3739d4c 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -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