summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2023-03-28 15:11:01 +0100
committerNigel Croxon <ncroxon@redhat.com>2023-04-04 09:28:42 -0400
commit7c89273dbe78f438037684216723b3ed8f6558b6 (patch)
tree9865eba58d5b3de2174318b1f35c800c80c841e5
parent98ef7f9f5fc3735f6c07310b4d519eb7afb49159 (diff)
downloadgnu-efi-7c89273dbe78f438037684216723b3ed8f6558b6.tar.gz
make: Fix shell exit status handling
Right now whenever we have shell commands with loops, errors in the middle are accidentally ignored, and make continues to process commands. This adds 'set -e' to all of those, so they'll propagate back up. Signed-off-by: Peter Jones <pjones@redhat.com>
-rw-r--r--Makefile4
-rw-r--r--lib/Makefile2
2 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index b8a6578..8dc91fc 100644
--- a/Makefile
+++ b/Makefile
@@ -83,14 +83,14 @@ $(SUBDIRS):
clean:
rm -f *~
- @for d in $(SUBDIRS); do \
+ @set -e ; for d in $(SUBDIRS); do \
if [ -d $(OBJDIR)/$$d ]; then \
$(MAKE) -C $(OBJDIR)/$$d -f $(SRCDIR)/$$d/Makefile SRCDIR=$(SRCDIR)/$$d clean; \
fi; \
done
install:
- @for d in $(SUBDIRS); do \
+ @set -e ; for d in $(SUBDIRS); do \
mkdir -p $(OBJDIR)/$$d; \
$(MAKE) -C $(OBJDIR)/$$d -f $(SRCDIR)/$$d/Makefile SRCDIR=$(SRCDIR)/$$d install; done
diff --git a/lib/Makefile b/lib/Makefile
index 3643b4d..4e0c9be 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -72,7 +72,7 @@ all: libsubdirs libefi.a
.PHONY: libsubdirs
libsubdirs:
- for sdir in $(SUBDIRS); do mkdir -p $$sdir; done
+ @set -e ; for sdir in $(SUBDIRS); do mkdir -p $$sdir; done
$(OBJS): libsubdirs