summaryrefslogtreecommitdiff
path: root/defs
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-09-11 11:04:33 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-09-11 11:04:33 +0900
commit2cc32ad67c04eb58cb3035c7ef779f441d29e7d9 (patch)
tree0c2d569e9776176d4fd28f0c27bcc79c7de7c806 /defs
parentb8d0ab80bb4890cc81353f9231b4838d024eaa25 (diff)
Split commit recipe and pass more macros
Diffstat (limited to 'defs')
-rw-r--r--defs/gmake.mk13
1 files changed, 10 insertions, 3 deletions
diff --git a/defs/gmake.mk b/defs/gmake.mk
index 155122376a..62f6ce3e9e 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -193,15 +193,22 @@ $(SCRIPTBINDIR):
$(Q) mkdir $@
.PHONY: commit
-commit: $(if $(filter commit,$(MAKECMDGOALS)),$(filter-out commit,$(MAKECMDGOALS))) up
+COMMIT_PREPARE := $(filter-out commit do-commit,$(MAKECMDGOALS)) up
+
+commit: pre-commit $(DOT_WAIT) do-commit $(DOT_WAIT) post_commit
+pre-commit: $(COMMIT_PREPARE)
+do-commit: $(if $(DOT_WAIT),,pre-commit)
@$(BASERUBY) -C "$(srcdir)" -I./tool/lib -rvcs -e 'VCS.detect(".").commit'
+post-commit: $(if $(DOT_WAIT),,do-commit)
+$(Q) \
{ \
$(in-srcdir) \
exec sed -f tool/prereq.status defs/gmake.mk template/Makefile.in common.mk; \
} | \
- $(MAKE) $(mflags) Q=$(Q) ECHO=$(ECHO) srcdir="$(srcdir)" srcs_vpath="" CHDIR="$(CHDIR)" \
- BOOTSTRAPRUBY="$(BOOTSTRAPRUBY)" MINIRUBY="$(BASERUBY)" BASERUBY="$(BASERUBY)" \
+ $(MAKE) $(mflags) Q=$(Q) ECHO=$(ECHO) \
+ top_srcdir="$(top_srcdir)" srcdir="$(srcdir)" srcs_vpath="" CHDIR="$(CHDIR)" \
+ BOOTSTRAPRUBY="$(BOOTSTRAPRUBY)" BOOTSTRAPRUBY_OPT="$(BOOTSTRAPRUBY_OPT)" \
+ MINIRUBY="$(BASERUBY)" BASERUBY="$(BASERUBY)" HAVE_BASERUBY="$(HAVE_BASERUBY)" \
VCSUP="" ENC_MK=.top-enc.mk REVISION_FORCE=PHONY CONFIGURE="$(CONFIGURE)" -f - \
update-src srcs all-incs