From e1f62d7f0e33de81a194f26a2c57e14e38d9de52 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 29 May 2019 07:46:44 +0900 Subject: [PATCH] Check the result of file2lastrev.rb if HAVE_BASERUBY is yes. We ignored the failure status of file2lastrev.rb on 73da429c36c, but it was for an environment without BASERUBY. I think we should skip running file2lastrev.rb on HAVE_BASERUBY=no, and run it and check the status on HAVE_BASERUBY=yes. Otherwise we may have an ignored arbitrary error of file2lastrev.rb on HAVE_BASERUBY=yes environment. --- common.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common.mk b/common.mk index 4f08bc2763..25050599f8 100755 --- a/common.mk +++ b/common.mk @@ -1091,8 +1091,11 @@ $(srcdir)/revision.h: $(Q)$(gnumake:yes=#) $(RM) $(@F) $(Q)$(gnumake:yes=#) exit > $@ || exit > $(@F) -$(REVISION_H): $(srcdir)/version.h $(srcdir)/tool/file2lastrev.rb $(REVISION_FORCE) - -$(Q) $(BASERUBY) $(srcdir)/tool/file2lastrev.rb -q --revision.h "$(srcdir)" > revision.tmp +revision.tmp: $(srcdir)/version.h $(srcdir)/tool/file2lastrev.rb $(REVISION_FORCE) +revision$(HAVE_BASERUBY:yes=.tmp): $(srcdir)/version.h $(srcdir)/tool/file2lastrev.rb $(REVISION_FORCE) + $(Q) $(BASERUBY) $(srcdir)/tool/file2lastrev.rb -q --revision.h "$(srcdir)" > revision.tmp + +$(REVISION_H): revision.tmp $(Q)$(IFCHANGE) "--timestamp=$@" "$(srcdir)/revision.h" revision.tmp $(srcdir)/ext/ripper/ripper.c: $(srcdir)/ext/ripper/tools/preproc.rb $(srcdir)/parse.y id.h