summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/wafsamba.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 063f9d2ed75..79f352878a8 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -913,12 +913,19 @@ def SAMBA_GENERATOR(bld, name, rule, source='', target='',
dep_vars.append('ruledeps')
dep_vars.append('SAMBA_GENERATOR_VARS')
+ shell=isinstance(rule, str)
+
+ # This ensures that if the command (executed in the shell) fails
+ # (returns non-zero), the build fails
+ if shell:
+ rule = "set -e; " + rule
+
bld.SET_BUILD_GROUP(group)
t = bld(
rule=rule,
source=bld.EXPAND_VARIABLES(source, vars=vars),
+ shell=shell,
target=target,
- shell=isinstance(rule, str),
update_outputs=True,
before='c',
ext_out='.c',