4c0d37
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
4c0d37
From: Peter Jones <pjones@redhat.com>
4c0d37
Date: Thu, 14 Nov 2019 09:54:39 -0500
4c0d37
Subject: [PATCH] make: Fix shell exit status handling.
4c0d37
4c0d37
Right now whenever we have shell commands with loops, errors in the
4c0d37
middle are accidentally ignored, and make continues to process commands.
4c0d37
4c0d37
This adds "set -e" to all of those, so they'll propagate back up.
4c0d37
4c0d37
Signed-off-by: Peter Jones <pjones@redhat.com>
4c0d37
---
4c0d37
 Makefile     | 4 ++--
4c0d37
 lib/Makefile | 2 +-
4c0d37
 2 files changed, 3 insertions(+), 3 deletions(-)
4c0d37
4c0d37
diff --git a/Makefile b/Makefile
4c0d37
index 84f07d33a48..a461a5c3483 100644
4c0d37
--- a/Makefile
4c0d37
+++ b/Makefile
4c0d37
@@ -81,14 +81,14 @@ $(SUBDIRS):
4c0d37
 
4c0d37
 clean:
4c0d37
 	rm -f *~
4c0d37
-	@for d in $(SUBDIRS); do \
4c0d37
+	@set -e ; for d in $(SUBDIRS); do \
4c0d37
 		if [ -d $(OBJDIR)/$$d ]; then \
4c0d37
 			$(MAKE) -C $(OBJDIR)/$$d -f $(SRCDIR)/$$d/Makefile SRCDIR=$(SRCDIR)/$$d clean; \
4c0d37
 		fi; \
4c0d37
 	done
4c0d37
 
4c0d37
 install:
4c0d37
-	@for d in $(SUBDIRS); do \
4c0d37
+	@set -e ; for d in $(SUBDIRS); do \
4c0d37
 		mkdir -p $(OBJDIR)/$$d; \
4c0d37
 		$(MAKE) -C $(OBJDIR)/$$d -f $(SRCDIR)/$$d/Makefile SRCDIR=$(SRCDIR)/$$d install; done
4c0d37
 
4c0d37
diff --git a/lib/Makefile b/lib/Makefile
4c0d37
index e7eafc01f1e..6fd472ad1ac 100644
4c0d37
--- a/lib/Makefile
4c0d37
+++ b/lib/Makefile
4c0d37
@@ -72,7 +72,7 @@ all: libsubdirs libefi.a
4c0d37
 
4c0d37
 .PHONY: libsubdirs
4c0d37
 libsubdirs:
4c0d37
-	for sdir in $(SUBDIRS); do mkdir -p $$sdir; done
4c0d37
+	@set -e ; for sdir in $(SUBDIRS); do mkdir -p $$sdir; done
4c0d37
 
4c0d37
 libefi.a: $(OBJS)
4c0d37
 	$(AR) $(ARFLAGS) $@ $^