diff --git a/Build/AtlasBuildScripts/build_Gaudi.sh b/Build/AtlasBuildScripts/build_Gaudi.sh
index b07758d86280ab1262df5a393a197e219a30d9aa..5138e9acea22039edfe8500352efff77fcc76d19 100755
--- a/Build/AtlasBuildScripts/build_Gaudi.sh
+++ b/Build/AtlasBuildScripts/build_Gaudi.sh
@@ -3,8 +3,12 @@
 # Script used for building Gaudi.
 #
 
-# Don't stop on errors:
+# Don't stop on errors but count them
 set +e
+ERROR_COUNT=0
+
+# consider a pipe failed if ANY of the commands fails
+set -o pipefail
 
 # Function printing the usage information for the script
 usage() {
@@ -75,30 +79,32 @@ if [ "$SOURCEDIR" = "" ] || [ "$BUILDDIR" = "" ] || [ "$INSTALLDIR" = "" ] \
 fi
 
 # Create the build directory if it doesn't exist, and move to it:
-mkdir -p ${BUILDDIR}
-cd ${BUILDDIR}
+mkdir -p ${BUILDDIR} || ((ERROR_COUNT++))
+cd ${BUILDDIR} || ((ERROR_COUNT++))
 
 # Set up the externals project:
-source ${EXTDIR}/setup.sh
+source ${EXTDIR}/setup.sh || ((ERROR_COUNT++))
 
 # Configure the build:
 cmake -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} -DCTEST_USE_LAUNCHERS:BOOL=TRUE \
     -DGAUDI_ATLAS:BOOL=TRUE -DGAUDI_ATLAS_BASE_PROJECT:STRING=${EXTPROJECT} \
     -DCMAKE_INSTALL_PREFIX:PATH=/InstallArea/${PLATFORM} \
-    ${SOURCEDIR} 2>&1 | tee cmake_config.log
+    ${SOURCEDIR} 2>&1 | tee cmake_config.log || ((ERROR_COUNT++))
 
 # Build it:
-make -k
+make -k || ((ERROR_COUNT++))
 
 # Install it:
-make -k install/fast DESTDIR=${INSTALLDIR}
+make -k install/fast DESTDIR=${INSTALLDIR} || ((ERROR_COUNT++))
 
 # If no RPM directory was specified, stop here:
 if [ "$RPMDIR" = "" ]; then
-    exit 0
+    exit ${ERROR_COUNT}
 fi
 
 # Build the RPM for the project:
-cpack
-mkdir -p ${RPMDIR}
-cp GAUDI*.rpm ${RPMDIR}
+cpack || ((ERROR_COUNT++))
+mkdir -p ${RPMDIR} || ((ERROR_COUNT++))
+cp GAUDI*.rpm ${RPMDIR} || ((ERROR_COUNT++))
+
+exit ${ERROR_COUNT}
diff --git a/Build/AtlasBuildScripts/build_atlasexternals.sh b/Build/AtlasBuildScripts/build_atlasexternals.sh
index ca17939ba81cc2b209177373925c473e40a592af..3848ef0025fe16301a5b4cffd060c333400bb776 100755
--- a/Build/AtlasBuildScripts/build_atlasexternals.sh
+++ b/Build/AtlasBuildScripts/build_atlasexternals.sh
@@ -4,8 +4,12 @@
 # repository.
 #
 
-# Don't stop on errors:
+# Don't stop on errors but count them
 set +e
+ERROR_COUNT=0
+
+# consider a pipe failed if ANY of the commands fails
+set -o pipefail
 
 # Function printing the usage information for the script
 usage() {
@@ -65,8 +69,8 @@ if [ "$SOURCEDIR" = "" ] || [ "$BUILDDIR" = "" ] || [ "$INSTALLDIR" = "" ]; then
 fi
 
 # Create the build directory if it doesn't exist, and move to it:
-mkdir -p ${BUILDDIR}
-cd ${BUILDDIR}
+mkdir -p ${BUILDDIR} || ((ERROR_COUNT++))
+cd ${BUILDDIR} || ((ERROR_COUNT++))
 
 # Extra settings for providing a project version for the build if necessary:
 EXTRACONF=
@@ -78,21 +82,23 @@ fi
 # Configure the build:
 cmake -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} -DCTEST_USE_LAUNCHERS:BOOL=TRUE \
     ${EXTRACONF} \
-    ${SOURCEDIR}/Projects/${PROJECT}/ 2>&1 | tee cmake_config.log
+    ${SOURCEDIR}/Projects/${PROJECT}/ 2>&1 | tee cmake_config.log || ((ERROR_COUNT++))
 
 # Build it:
-make -k
+make -k || ((ERROR_COUNT++))
 
 # Install it:
-make -k install/fast DESTDIR=${INSTALLDIR}
+make -k install/fast DESTDIR=${INSTALLDIR} || ((ERROR_COUNT++))
 
 # If no RPM directory was specified, stop here:
 if [ "$RPMDIR" = "" ]; then
-    exit 0
+    exit ${ERROR_COUNT}
 fi
 
 # Build the RPM or other package for the project:
-cpack
-mkdir -p ${RPMDIR}
+cpack || ((ERROR_COUNT++))
+mkdir -p ${RPMDIR} || ((ERROR_COUNT++))
 FILES=$(ls ${PROJECT}*.rpm ${PROJECT}*.tar.gz ${PROJECT}*.dmg)
-cp ${FILES} ${RPMDIR}
+cp ${FILES} ${RPMDIR} || ((ERROR_COUNT++))
+
+exit ${ERROR_COUNT}
diff --git a/Projects/Athena/build.sh b/Projects/Athena/build.sh
index e2e3790b322d823579be3503bc560613afe47b66..3ff8eda92cd49272b8a78fded468fc9ef64096c7 100755
--- a/Projects/Athena/build.sh
+++ b/Projects/Athena/build.sh
@@ -75,6 +75,8 @@ fi
 
 # Stop on errors from here on out:
 set -e
+# consider a pipe failed if ANY of the commands fails
+set -o pipefail
 
 # Source in our environment
 AthenaSrcDir=$(dirname ${BASH_SOURCE[0]})
@@ -89,9 +91,6 @@ source $AthenaSrcDir/build_env.sh -b $BUILDDIR
 mkdir -p ${BUILDDIR}/build/Athena
 cd ${BUILDDIR}/build/Athena
 
-# consider a pipe failed if ANY of the commands fails
-set -o pipefail
-
 # CMake:
 if [ -n "$EXE_CMAKE" ]; then
     # Remove the CMakeCache.txt file, to force CMake to find externals