]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
build: stop on error in subcommand
authorJan Engelhardt <jengelh@medozas.de>
Sat, 11 Dec 2010 02:35:48 +0000 (03:35 +0100)
committerJan Engelhardt <jengelh@medozas.de>
Sat, 11 Dec 2010 02:37:17 +0000 (03:37 +0100)
make only evaluates $? of an entire shell invocation. As such, if any
command in the chain can fail, $? needs to be thrown, and early so.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
extensions/GNUmakefile.in

index 7c4790187e4c5eebc0e0739c8b88ff0ce836802b..74a058c141cd01af566c8958db27bb40d514053d 100644 (file)
@@ -165,14 +165,14 @@ man_run    = \
                if [ -f "$$f" ] && grep -Eq "$(3)|NFPROTO_UNSPEC" "$$cf"; then \
                        echo -e "\t+ $$f" >&2; \
                        echo ".SS $$ext"; \
-                       cat "$$f"; \
+                       cat "$$f" || exit $$?; \
                        continue; \
                fi; \
                f="${srcdir}/lib$(2)t_$$ext.man"; \
                if [ -f "$$f" ]; then \
                        echo -e "\t+ $$f" >&2; \
                        echo ".SS $$ext"; \
-                       cat "$$f"; \
+                       cat "$$f" || exit $$?; \
                        continue; \
                fi; \
        done >$@;