maint.mk: avoid a sub-shell
[gnulib.git] / top / maint.mk
index 2af938e..6336e3a 100644 (file)
@@ -1387,9 +1387,8 @@ release-prep:
        echo $(VERSION) > $(prev_version_file)
        $(MAKE) update-NEWS-hash
        perl -pi -e '$$. == 3 and print "$(gl_noteworthy_news_)\n\n\n"' $(srcdir)/NEWS
-       $(emit-commit-log) > .ci-msg
-       $(VC) commit -F .ci-msg -a
-       rm .ci-msg
+       msg=$$($(emit-commit-log)) || exit 1;           \
+       cd $(srcdir) && $(VC) commit -m "$$msg" -a
 
 # Override this with e.g., -s $(srcdir)/some_other_name.texi
 # if the default $(PACKAGE)-derived name doesn't apply.