aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-09-26 10:20:24 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-09-26 13:03:23 +0900
commitecffc6a203822a828d00afece9c9cd782ff60a66 (patch)
tree71c8f99f1cc8a620cd3389c8b013063a5b29c1f5 /configure.ac
parentb361bdc20036688f17f1e39a260a70254e7db9cd (diff)
downloadruby-ecffc6a203822a828d00afece9c9cd782ff60a66.tar.gz
Generate the revision.h before Makefile
Except for GNU make which updates makefiles automatically, repeating configure in the same directory causes `make` to stop whenever pulled a new commit. This is unexpected in CIs.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 55288b92c0..206470ae0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4368,6 +4368,14 @@ AC_SUBST(XCC_WRAPPER)
AS_CASE([" $CPP "], [*" $CC "*], [CPP=`echo " $CPP " | sed "s| $CC |"' $(CC) |;s/^ *//;s/ *$//'`])
+AS_IF([test ! -f "$srcdir/revision.h"], [
+ AS_IF([test "x$HAVE_BASERUBY" = xyes], [
+ ${BASERUBY} -C "$srcdir" tool/file2lastrev.rb -q --revision.h > "$srcdir/revision.h"
+ ], [
+ touch "$srcdir/revision.h"
+ ])
+])
+
AS_IF([test x"$firstmf" != x], [
AC_CONFIG_FILES($firstmf:$firsttmpl, [], [firstmf="$firstmf" firsttmpl="$firsttmpl"])
])