From: Jan Engelhardt Date: Sat, 11 Dec 2010 02:35:48 +0000 (+0100) Subject: build: stop on error in subcommand X-Git-Tag: v1.4.11~112^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3f101331deb9314caa0cfa1061c925865e79380;p=thirdparty%2Fiptables.git build: stop on error in subcommand 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 --- diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in index 7c479018..74a058c1 100644 --- a/extensions/GNUmakefile.in +++ b/extensions/GNUmakefile.in @@ -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 >$@;