make: run shell with pipefail
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 14 Oct 2020 11:35:13 +0000 (07:35 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 17 Oct 2020 14:45:49 +0000 (10:45 -0400)
Without pipefail, it is possible to miss failures if the recipes
include pipes.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Makefile

index d20c7a3f803f211a449037a047575408a2ccb080..91c62a26c846c9aeeeb3f4b97ee0620d096c9e56 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,8 @@ SRC_PATH=.
 # we have explicit rules for everything
 MAKEFLAGS += -rR
 
+SHELL = /usr/bin/env bash -o pipefail
+
 # Usage: $(call quiet-command,command and args,"NAME","args to print")
 # This will run "command and args", and either:
 #  if V=1 just print the whole command and args