diff --git a/build/wrs_build-all b/build/wrs_build-all
index d55a5bdc32bb3e2291723816cd740d0eb7c80a0e..433de942de416dbcdeadfd4e66598c00bf2c4730 100755
--- a/build/wrs_build-all
+++ b/build/wrs_build-all
@@ -125,17 +125,13 @@ wrs_build_step () {
     # I sometimes set WRS_SH_OPTIONS to "-x" to help me in debugging
     bash $WRS_SH_OPTIONS $script
     if [ $? -ne 0 ];
-	then failed_step=true;
-	else touch $markerfile
+	then
+		wrs_die "Building step $script failed. Build aborted !"
+	else 
+		touch $markerfile
     fi
 }
 
-
-
-
-
-failed_step=false; # this is set to "true" but the wrs_build_step function
-
 # Now build the stuff one step at a time, only if not already done.
 # Steps 0 and 11 are redone in any case:
 #   step 0 is downloading, and re-cecking md5sum has no side effects
@@ -157,7 +153,4 @@ wrs_build_step    09-wrs-userspace       wrs_build_userspace
 wrs_build_step    10-wrs-gateware        wrs_build_gateware
 wrs_build_step    11-wrap-rootfs         wrs_build_wraprootfs
 
-if $failed_step; then
-    wrs_die "One or more build steps failed"
-fi
 wrs_echo "Complete build succeeded, apparently"