summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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