From daf666d717b9cb741690ed2ee867dbe32ce0a303 Mon Sep 17 00:00:00 2001
From: Michael Wild <themiwi@users.sourceforge.net>
Date: Mon, 18 Jul 2011 17:34:39 +0200
Subject: [PATCH] ENH: Abort {All,}wmake on first error

Signed-off-by: Michael Wild <themiwi@users.sourceforge.net>
---
 Allwmake                                           |    1 +
 applications/Allwmake                              |    1 +
 .../solvers/compressible/rhoCentralFoam/Allwmake   |    1 +
 .../solvers/compressible/rhoPimpleFoam/Allwmake    |    1 +
 .../solvers/compressible/rhoSimpleFoam/Allwmake    |    1 +
 .../solvers/compressible/sonicFoam/Allwmake        |    1 +
 .../heatTransfer/chtMultiRegionFoam/Allwmake       |    1 +
 .../solvers/incompressible/pimpleFoam/Allwmake     |    1 +
 .../solvers/incompressible/simpleFoam/Allwmake     |    1 +
 .../multiphase/compressibleInterFoam/Allwmake      |    1 +
 applications/solvers/multiphase/interFoam/Allwmake |    1 +
 .../multiphase/multiphaseInterFoam/Allwmake        |    1 +
 .../solvers/multiphase/twoPhaseEulerFoam/Allwmake  |    1 +
 .../utilities/mesh/conversion/Optional/Allwmake    |    1 +
 .../utilities/mesh/generation/extrude/Allwmake     |    1 +
 .../utilities/mesh/manipulation/setSet/Allwmake    |    1 +
 .../dataConversion/foamToTecplot360/Allwmake       |    1 +
 .../postProcessing/graphics/PV3Readers/Allwmake    |    1 +
 .../graphics/PV3Readers/PV3FoamReader/Allwmake     |    1 +
 .../PV3Readers/PV3blockMeshReader/Allwmake         |    1 +
 .../graphics/ensightFoamReader/Allwmake            |    1 +
 .../graphics/fieldview9Reader/Allwmake             |    1 +
 .../preProcessing/wallFunctionTable/Allwmake       |    1 +
 doc/Allwmake                                       |    1 +
 doc/Doxygen/Allwmake                               |    1 +
 etc/config/unset.csh                               |    1 +
 etc/config/unset.sh                                |    1 +
 src/Allwmake                                       |    1 +
 src/OSspecific/POSIX/Allwmake                      |    1 +
 src/Pstream/Allwmake                               |    1 +
 src/conversion/Allwmake                            |    1 +
 src/dummyThirdParty/Allwmake                       |    1 +
 src/fvAgglomerationMethods/Allwmake                |    1 +
 src/lagrangian/Allwmake                            |    1 +
 src/lagrangian/molecularDynamics/Allwmake          |    1 +
 src/mesh/Allwmake                                  |    1 +
 src/parallel/Allwmake                              |    1 +
 src/parallel/decompose/Allwmake                    |    1 +
 src/parallel/reconstruct/Allwmake                  |    1 +
 src/postProcessing/Allwmake                        |    1 +
 src/postProcessing/functionObjects/Allwmake        |    1 +
 src/regionModels/Allwmake                          |    1 +
 src/thermophysicalModels/Allwmake                  |    1 +
 src/thermophysicalModels/properties/Allwmake       |    1 +
 src/transportModels/Allwmake                       |    1 +
 src/turbulenceModels/Allwmake                      |    1 +
 src/turbulenceModels/LES/Allwmake                  |    1 +
 src/turbulenceModels/compressible/Allwmake         |    1 +
 src/turbulenceModels/incompressible/Allwmake       |    1 +
 wmake/wmake                                        |    2 +-
 50 files changed, 50 insertions(+), 1 deletions(-)

diff --git a/Allwmake b/Allwmake
index 16edfd1..08a7654 100755
--- a/Allwmake
+++ b/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 
 wmakeCheckPwd "$WM_PROJECT_DIR" || {
     echo "Error: Current directory is not \$WM_PROJECT_DIR"
diff --git a/applications/Allwmake b/applications/Allwmake
index 00bc326..600af6c 100755
--- a/applications/Allwmake
+++ b/applications/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 
 wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
     echo "Error: Current directory is not \$WM_PROJECT_DIR/applications"
diff --git a/applications/solvers/compressible/rhoCentralFoam/Allwmake b/applications/solvers/compressible/rhoCentralFoam/Allwmake
index 671c640..6bdc6d4 100755
--- a/applications/solvers/compressible/rhoCentralFoam/Allwmake
+++ b/applications/solvers/compressible/rhoCentralFoam/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake libso BCs
diff --git a/applications/solvers/compressible/rhoPimpleFoam/Allwmake b/applications/solvers/compressible/rhoPimpleFoam/Allwmake
index 241e22e..d504f90 100755
--- a/applications/solvers/compressible/rhoPimpleFoam/Allwmake
+++ b/applications/solvers/compressible/rhoPimpleFoam/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake
diff --git a/applications/solvers/compressible/rhoSimpleFoam/Allwmake b/applications/solvers/compressible/rhoSimpleFoam/Allwmake
index 33916c7..3c5925e 100755
--- a/applications/solvers/compressible/rhoSimpleFoam/Allwmake
+++ b/applications/solvers/compressible/rhoSimpleFoam/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake
diff --git a/applications/solvers/compressible/sonicFoam/Allwmake b/applications/solvers/compressible/sonicFoam/Allwmake
index 27c1194..957a32d 100755
--- a/applications/solvers/compressible/sonicFoam/Allwmake
+++ b/applications/solvers/compressible/sonicFoam/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwmake b/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwmake
index be40e0c..79383da 100755
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwmake
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake libso coupledDerivedFvPatchFields
diff --git a/applications/solvers/incompressible/pimpleFoam/Allwmake b/applications/solvers/incompressible/pimpleFoam/Allwmake
index 71517c7..5dbea42 100755
--- a/applications/solvers/incompressible/pimpleFoam/Allwmake
+++ b/applications/solvers/incompressible/pimpleFoam/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake
diff --git a/applications/solvers/incompressible/simpleFoam/Allwmake b/applications/solvers/incompressible/simpleFoam/Allwmake
index 79109c8..a417448 100755
--- a/applications/solvers/incompressible/simpleFoam/Allwmake
+++ b/applications/solvers/incompressible/simpleFoam/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake
diff --git a/applications/solvers/multiphase/compressibleInterFoam/Allwmake b/applications/solvers/multiphase/compressibleInterFoam/Allwmake
index 644094d..1b9de12 100755
--- a/applications/solvers/multiphase/compressibleInterFoam/Allwmake
+++ b/applications/solvers/multiphase/compressibleInterFoam/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake
diff --git a/applications/solvers/multiphase/interFoam/Allwmake b/applications/solvers/multiphase/interFoam/Allwmake
index 8044426..ef4e495 100755
--- a/applications/solvers/multiphase/interFoam/Allwmake
+++ b/applications/solvers/multiphase/interFoam/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake
diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Allwmake b/applications/solvers/multiphase/multiphaseInterFoam/Allwmake
index 6e47f91..260d95d 100755
--- a/applications/solvers/multiphase/multiphaseInterFoam/Allwmake
+++ b/applications/solvers/multiphase/multiphaseInterFoam/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake libso multiphaseMixture
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake
index 29294d1..ad016d5 100755
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake libso phaseModel
diff --git a/applications/utilities/mesh/conversion/Optional/Allwmake b/applications/utilities/mesh/conversion/Optional/Allwmake
index 2580037..33fb4bb 100755
--- a/applications/utilities/mesh/conversion/Optional/Allwmake
+++ b/applications/utilities/mesh/conversion/Optional/Allwmake
@@ -3,6 +3,7 @@
 # Build optional components (eg, may depend on third-party libraries)
 # -----------------------------------------------------------------------------
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 # build libccmio and create lnInclude directory
diff --git a/applications/utilities/mesh/generation/extrude/Allwmake b/applications/utilities/mesh/generation/extrude/Allwmake
index 091ec04..6b46fcf 100755
--- a/applications/utilities/mesh/generation/extrude/Allwmake
+++ b/applications/utilities/mesh/generation/extrude/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake libso extrudeModel
diff --git a/applications/utilities/mesh/manipulation/setSet/Allwmake b/applications/utilities/mesh/manipulation/setSet/Allwmake
index 3be0afc..79df68b 100755
--- a/applications/utilities/mesh/manipulation/setSet/Allwmake
+++ b/applications/utilities/mesh/manipulation/setSet/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 
 unset COMP_FLAGS LINK_FLAGS
 
diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake
index 99e4ccb..a82f439 100755
--- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake
+++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 
 if [ ! -d ${WM_THIRD_PARTY_DIR}/tecio ]
 then
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake
index 6851210..7d59d09 100755
--- a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake
index c99e05f..85e5c9c 100755
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake
index 4f055b3..70a7764 100755
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake b/applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake
index f29cdda..279e17b 100755
--- a/applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake
+++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 
 wmake libso
 
diff --git a/applications/utilities/postProcessing/graphics/fieldview9Reader/Allwmake b/applications/utilities/postProcessing/graphics/fieldview9Reader/Allwmake
index e482554..c40595d 100755
--- a/applications/utilities/postProcessing/graphics/fieldview9Reader/Allwmake
+++ b/applications/utilities/postProcessing/graphics/fieldview9Reader/Allwmake
@@ -2,6 +2,7 @@
 
 # disabled
 
+# [ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 # if [ "$FV_HOME" -a -r $FV_HOME ]
 # then
 #    wmake fieldview9Reader
diff --git a/applications/utilities/preProcessing/wallFunctionTable/Allwmake b/applications/utilities/preProcessing/wallFunctionTable/Allwmake
index 55a6cbd..abf1d4d 100755
--- a/applications/utilities/preProcessing/wallFunctionTable/Allwmake
+++ b/applications/utilities/preProcessing/wallFunctionTable/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake libso tabulatedWallFunction
diff --git a/doc/Allwmake b/doc/Allwmake
index 5d8ed9c..9de40f5 100755
--- a/doc/Allwmake
+++ b/doc/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 # fix permissions (NB: '+X' and not '+x'!)
diff --git a/doc/Doxygen/Allwmake b/doc/Doxygen/Allwmake
index fbc20d9..41d3d54 100755
--- a/doc/Doxygen/Allwmake
+++ b/doc/Doxygen/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 
 [ -d "$WM_PROJECT_DIR" ] || {
     echo "Error: WM_PROJECT_DIR directory does not exist"
diff --git a/etc/config/unset.csh b/etc/config/unset.csh
index d9a3d69..43526e5 100644
--- a/etc/config/unset.csh
+++ b/etc/config/unset.csh
@@ -85,6 +85,7 @@ unsetenv WM_PROJECT_USER_DIR
 unsetenv WM_PROJECT_VERSION
 unsetenv WM_SCHEDULER
 unsetenv WM_THIRD_PARTY_DIR
+unsetenv WM_CONTINUE_ON_ERROR
 
 
 #------------------------------------------------------------------------------
diff --git a/etc/config/unset.sh b/etc/config/unset.sh
index 66ee2e3..add32e6 100644
--- a/etc/config/unset.sh
+++ b/etc/config/unset.sh
@@ -72,6 +72,7 @@ unset WM_PROJECT_USER_DIR
 unset WM_PROJECT_VERSION
 unset WM_SCHEDULER
 unset WM_THIRD_PARTY_DIR
+unset WM_CONTINUE_ON_ERROR
 
 
 #------------------------------------------------------------------------------
diff --git a/src/Allwmake b/src/Allwmake
index aa17b41..52d7182 100755
--- a/src/Allwmake
+++ b/src/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 
 wmakeCheckPwd "$WM_PROJECT_DIR/src" || {
     echo "Error: Current directory is not \$WM_PROJECT_DIR/src"
diff --git a/src/OSspecific/POSIX/Allwmake b/src/OSspecific/POSIX/Allwmake
index c68f089..9474b99 100755
--- a/src/OSspecific/POSIX/Allwmake
+++ b/src/OSspecific/POSIX/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 
 unset COMP_FLAGS LINK_FLAGS
 
diff --git a/src/Pstream/Allwmake b/src/Pstream/Allwmake
index 50ccb5f..1d26981 100755
--- a/src/Pstream/Allwmake
+++ b/src/Pstream/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 
 
 #
diff --git a/src/conversion/Allwmake b/src/conversion/Allwmake
index 014885d..6b87795 100755
--- a/src/conversion/Allwmake
+++ b/src/conversion/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake $makeType
diff --git a/src/dummyThirdParty/Allwmake b/src/dummyThirdParty/Allwmake
index d747a47..4c0472b 100755
--- a/src/dummyThirdParty/Allwmake
+++ b/src/dummyThirdParty/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake $makeType scotchDecomp
diff --git a/src/fvAgglomerationMethods/Allwmake b/src/fvAgglomerationMethods/Allwmake
index aa03907..9c322a0 100755
--- a/src/fvAgglomerationMethods/Allwmake
+++ b/src/fvAgglomerationMethods/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 export ParMGridGen=$WM_THIRD_PARTY_DIR/ParMGridGen-1.0
diff --git a/src/lagrangian/Allwmake b/src/lagrangian/Allwmake
index bedfd29..0854392 100755
--- a/src/lagrangian/Allwmake
+++ b/src/lagrangian/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake $makeType distributionModels
diff --git a/src/lagrangian/molecularDynamics/Allwmake b/src/lagrangian/molecularDynamics/Allwmake
index 7c17819..479a9f5 100755
--- a/src/lagrangian/molecularDynamics/Allwmake
+++ b/src/lagrangian/molecularDynamics/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake $makeType potential
diff --git a/src/mesh/Allwmake b/src/mesh/Allwmake
index 7120940..b1707a2 100755
--- a/src/mesh/Allwmake
+++ b/src/mesh/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake $makeType autoMesh
diff --git a/src/parallel/Allwmake b/src/parallel/Allwmake
index ab84e5b..db736bd 100755
--- a/src/parallel/Allwmake
+++ b/src/parallel/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 decompose/Allwmake $*
diff --git a/src/parallel/decompose/Allwmake b/src/parallel/decompose/Allwmake
index b620b27..d027391 100755
--- a/src/parallel/decompose/Allwmake
+++ b/src/parallel/decompose/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 
 # get SCOTCH_VERSION, SCOTCH_ARCH_PATH
 if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/scotch.sh`
diff --git a/src/parallel/reconstruct/Allwmake b/src/parallel/reconstruct/Allwmake
index 85e8e97..837aaa0 100755
--- a/src/parallel/reconstruct/Allwmake
+++ b/src/parallel/reconstruct/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake $makeType reconstruct
diff --git a/src/postProcessing/Allwmake b/src/postProcessing/Allwmake
index 24b764c..bcb8e1d 100755
--- a/src/postProcessing/Allwmake
+++ b/src/postProcessing/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake libo postCalc
diff --git a/src/postProcessing/functionObjects/Allwmake b/src/postProcessing/functionObjects/Allwmake
index e62cdf8..3224d6d 100755
--- a/src/postProcessing/functionObjects/Allwmake
+++ b/src/postProcessing/functionObjects/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake $makeType field
diff --git a/src/regionModels/Allwmake b/src/regionModels/Allwmake
index 5c97cae..827e76e 100755
--- a/src/regionModels/Allwmake
+++ b/src/regionModels/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake $makeType regionModel
diff --git a/src/thermophysicalModels/Allwmake b/src/thermophysicalModels/Allwmake
index 7927a97..7fdd4a1 100755
--- a/src/thermophysicalModels/Allwmake
+++ b/src/thermophysicalModels/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake $makeType specie
diff --git a/src/thermophysicalModels/properties/Allwmake b/src/thermophysicalModels/properties/Allwmake
index f088d14..81b52f3 100755
--- a/src/thermophysicalModels/properties/Allwmake
+++ b/src/thermophysicalModels/properties/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake $makeType liquidProperties
diff --git a/src/transportModels/Allwmake b/src/transportModels/Allwmake
index 21078c0..07cc886 100755
--- a/src/transportModels/Allwmake
+++ b/src/transportModels/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake $makeType incompressible
diff --git a/src/turbulenceModels/Allwmake b/src/turbulenceModels/Allwmake
index e78f0c3..95fb990 100755
--- a/src/turbulenceModels/Allwmake
+++ b/src/turbulenceModels/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 LES/Allwmake $*
diff --git a/src/turbulenceModels/LES/Allwmake b/src/turbulenceModels/LES/Allwmake
index 6ee54e6..c87a64f 100755
--- a/src/turbulenceModels/LES/Allwmake
+++ b/src/turbulenceModels/LES/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmakeLnInclude ../incompressible/LES
diff --git a/src/turbulenceModels/compressible/Allwmake b/src/turbulenceModels/compressible/Allwmake
index 6e230c0..cfb2bb8 100755
--- a/src/turbulenceModels/compressible/Allwmake
+++ b/src/turbulenceModels/compressible/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake $makeType turbulenceModel
diff --git a/src/turbulenceModels/incompressible/Allwmake b/src/turbulenceModels/incompressible/Allwmake
index 6e230c0..cfb2bb8 100755
--- a/src/turbulenceModels/incompressible/Allwmake
+++ b/src/turbulenceModels/incompressible/Allwmake
@@ -1,6 +1,7 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
 makeType=${1:-libso}
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
 set -x
 
 wmake $makeType turbulenceModel
diff --git a/wmake/wmake b/wmake/wmake
index abb6aa8..b68a8cb 100755
--- a/wmake/wmake
+++ b/wmake/wmake
@@ -182,7 +182,7 @@ then
         # FOAM_APPS=$(find . -maxdepth 1 \( -type d -a ! -name "." -a ! -name Optional -a ! -name Make \)  -printf "%f ")
         # avoid 'find' with '-printf' ... not entirely portable
         FOAM_APPS=$(for d in *; do [ -d "$d" -a "$d" != Optional -a "$d" != Make ] && echo "$d"; done | xargs)
-        $make -k -f $WM_DIR/MakefileApps FOAM_APPS="$FOAM_APPS"
+        $make ${WM_CONTINUE_ON_ERROR:+-k} -f $WM_DIR/MakefileApps FOAM_APPS="$FOAM_APPS"
         exit $?
     fi
 fi
-- 
1.7.4.1

