]> xenbits.xensource.com Git - people/liuw/xtf.git/commitdiff
Fix the handling of errors in the all/build targets
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 20 Jul 2016 15:26:33 +0000 (16:26 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 20 Jul 2016 15:26:33 +0000 (16:26 +0100)
Currently a build error will be eaten by the shell for loop, causing the
makefile not to stop.  Use `set -e;` to prevent this behaviour

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Makefile

index 1a8099dca3da848cace06c2499b849a69da0f4c6..4d8fffcc5464380f29b1351c3be01afcdaa5103c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ PREFIX ?= $(ROOT)
 
 .PHONY: all
 all:
-       @for D in $(wildcard tests/*); do \
+       @set -e; for D in $(wildcard tests/*); do \
                [ ! -e $$D/Makefile ] && continue; \
                $(MAKE) -C $$D build; \
        done
@@ -14,7 +14,7 @@ all:
 install:
        @mkdir -p $(DESTDIR)
        install -m775 xtf-runner $(DESTDIR)
-       @for D in $(wildcard tests/*); do \
+       @set -e; for D in $(wildcard tests/*); do \
                [ ! -e $$D/Makefile ] && continue; \
                $(MAKE) -C $$D install; \
        done