diff --git a/Allwmake b/Allwmake
index 16edfd1..a5ef923 100755
--- a/Allwmake
+++ b/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+allwmakeOptions='-allow-doc doDoxygen' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 
 wmakeCheckPwd "$WM_PROJECT_DIR" || {
     echo "Error: Current directory is not \$WM_PROJECT_DIR"
@@ -29,7 +30,7 @@ fi
 src/Allwmake
 applications/Allwmake
 
-if [ "$1" = doc ]
+if [ $doDoxygen -gt 0 ]
 then
     doc/Allwmake
 fi
diff --git a/applications/Allwmake b/applications/Allwmake
index 00bc326..e9212d8 100755
--- a/applications/Allwmake
+++ b/applications/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 
 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..5ca08e8 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake libso BCs
diff --git a/applications/solvers/compressible/rhoPimpleFoam/Allwmake b/applications/solvers/compressible/rhoPimpleFoam/Allwmake
index 241e22e..9f213da 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake
diff --git a/applications/solvers/compressible/rhoSimpleFoam/Allwmake b/applications/solvers/compressible/rhoSimpleFoam/Allwmake
index 33916c7..57a276d 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake
diff --git a/applications/solvers/compressible/sonicFoam/Allwmake b/applications/solvers/compressible/sonicFoam/Allwmake
index 27c1194..8ea5e5e 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwmake b/applications/solvers/heatTransfer/chtMultiRegionFoam/Allwmake
index be40e0c..432ec68 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake libso coupledDerivedFvPatchFields
diff --git a/applications/solvers/incompressible/pimpleFoam/Allwmake b/applications/solvers/incompressible/pimpleFoam/Allwmake
index 8727bdb..2c31a48 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake
diff --git a/applications/solvers/incompressible/simpleFoam/Allwmake b/applications/solvers/incompressible/simpleFoam/Allwmake
index 79109c8..b6ec6fc 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake
diff --git a/applications/solvers/multiphase/compressibleInterFoam/Allwmake b/applications/solvers/multiphase/compressibleInterFoam/Allwmake
index 644094d..bc45dba 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake
diff --git a/applications/solvers/multiphase/interFoam/Allwmake b/applications/solvers/multiphase/interFoam/Allwmake
index 8044426..fd2d880 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake
diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Allwmake b/applications/solvers/multiphase/multiphaseInterFoam/Allwmake
index 6e47f91..4879568 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake libso multiphaseMixture
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake
index 29294d1..b6cb96c 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake libso phaseModel
diff --git a/applications/utilities/mesh/conversion/Optional/Allwmake b/applications/utilities/mesh/conversion/Optional/Allwmake
index 2580037..d43fdf1 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 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..679858f 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake libso extrudeModel
diff --git a/applications/utilities/mesh/manipulation/setSet/Allwmake b/applications/utilities/mesh/manipulation/setSet/Allwmake
index 3be0afc..f368535 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
+allwmakeOptions='-allow-readline readingMode' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 
 unset COMP_FLAGS LINK_FLAGS
 
@@ -10,7 +11,7 @@ unset COMP_FLAGS LINK_FLAGS
 # eg,  ./Allwmake NO_READLINE
 #
 
-if [ -f /usr/include/readline/readline.h -a "${1%NO_READLINE}" = "$1" ]
+if [ -f /usr/include/readline/readline.h -a "${readingMode%NO_READLINE}" = "$readingMode" ]
 then
     echo "Found <readline/readline.h>  --  enabling readline support."
     export COMP_FLAGS="-DHAS_READLINE"
diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake
index 99e4ccb..a6161d3 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 
 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..49748dd 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 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..fa0178c 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 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..e450716 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 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..9cad647 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 
 wmake libso
 
diff --git a/applications/utilities/postProcessing/graphics/fieldview9Reader/Allwmake b/applications/utilities/postProcessing/graphics/fieldview9Reader/Allwmake
index e482554..f5e05df 100755
--- a/applications/utilities/postProcessing/graphics/fieldview9Reader/Allwmake
+++ b/applications/utilities/postProcessing/graphics/fieldview9Reader/Allwmake
@@ -2,6 +2,7 @@
 
 # disabled
 
+# . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 # 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..b0cdd1e 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
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake libso tabulatedWallFunction
diff --git a/doc/Allwmake b/doc/Allwmake
index 5d8ed9c..f7bf825 100755
--- a/doc/Allwmake
+++ b/doc/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 # fix permissions (NB: '+X' and not '+x'!)
diff --git a/doc/Doxygen/Allwmake b/doc/Doxygen/Allwmake
index fbc20d9..10d0711 100755
--- a/doc/Doxygen/Allwmake
+++ b/doc/Doxygen/Allwmake
@@ -1,5 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
+. $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 
 [ -d "$WM_PROJECT_DIR" ] || {
     echo "Error: WM_PROJECT_DIR directory does not exist"
diff --git a/etc/config/aliases.csh b/etc/config/aliases.csh
index 6573c91..b6b6c57 100644
--- a/etc/config/aliases.csh
+++ b/etc/config/aliases.csh
@@ -47,6 +47,11 @@ alias wmUNSET='source $WM_PROJECT_DIR/etc/config/unset.csh'
 alias wmSchedON 'setenv WM_SCHEDULER $WM_PROJECT_DIR/wmake/wmakeScheduler'
 alias wmSchedOFF 'unsetenv WM_SCHEDULER'
 
+# Toggle WM_CONTINUE_ON_ERROR on/off
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+alias wmNONSTOP 'setenv WM_CONTINUE_ON_ERROR 1'
+alias wmSTOPON1st 'unsetenv WM_CONTINUE_ON_ERROR'
+
 # Change ParaView version
 # ~~~~~~~~~~~~~~~~~~~~~~~
 alias foamPV 'source `$WM_PROJECT_DIR/etc/config/paraview.csh` ParaView_VERSION=\!*; echo paraview-$ParaView_VERSION'
diff --git a/etc/config/aliases.sh b/etc/config/aliases.sh
index 1881597..e651e37 100644
--- a/etc/config/aliases.sh
+++ b/etc/config/aliases.sh
@@ -47,6 +47,11 @@ alias wmUNSET='. $WM_PROJECT_DIR/etc/config/unset.sh'
 alias wmSchedON='export WM_SCHEDULER=$WM_PROJECT_DIR/wmake/wmakeScheduler'
 alias wmSchedOFF='unset WM_SCHEDULER'
 
+# Toggle WM_CONTINUE_ON_ERROR on/off
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+alias wmNONSTOP='export WM_CONTINUE_ON_ERROR=1'
+alias wmSTOPON1st='unset WM_CONTINUE_ON_ERROR'
+
 # Change ParaView version
 # ~~~~~~~~~~~~~~~~~~~~~~~
 unset foamPV
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..8980d12 100755
--- a/src/Allwmake
+++ b/src/Allwmake
@@ -1,6 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 
 wmakeCheckPwd "$WM_PROJECT_DIR/src" || {
     echo "Error: Current directory is not \$WM_PROJECT_DIR/src"
@@ -22,7 +22,7 @@ wmakePrintBuild -check || /bin/rm -f OpenFOAM/Make/*/global.? 2>/dev/null
 
 wmakeLnInclude OpenFOAM
 wmakeLnInclude OSspecific/${WM_OSTYPE:-POSIX}
-Pstream/Allwmake $*
+Pstream/Allwmake $OriginalOptions
 
 OSspecific/${WM_OSTYPE:-POSIX}/Allwmake
 wmake $makeType OpenFOAM
@@ -36,7 +36,7 @@ wmake $makeType surfMesh
 # Decomposition methods needed by dummyThirdParty
 parallel/decompose/AllwmakeLnInclude
 # dummyThirdParty (dummy metisDecomp, scotchDecomp etc) needed by e.g. meshTools
-dummyThirdParty/Allwmake $*
+dummyThirdParty/Allwmake $OriginalOptions
 
 wmake $makeType finiteVolume
 wmake $makeType lagrangian/basic
@@ -44,7 +44,7 @@ wmake $makeType lagrangian/distributionModels
 wmake $makeType genericPatchFields
 
 # Build the proper scotchDecomp, metisDecomp etc.
-parallel/Allwmake $*
+parallel/Allwmake $OriginalOptions
 
 wmake $makeType conversion
 
@@ -57,16 +57,16 @@ wmake $makeType topoChangerFvMesh
 wmake $makeType ODE
 wmake $makeType randomProcesses
 
-thermophysicalModels/Allwmake $*
-transportModels/Allwmake $*
-turbulenceModels/Allwmake $*
+thermophysicalModels/Allwmake $OriginalOptions
+transportModels/Allwmake $OriginalOptions
+turbulenceModels/Allwmake $OriginalOptions
 wmake $makeType combustionModels
-regionModels/Allwmake $*
-lagrangian/Allwmake $*
-postProcessing/Allwmake $*
-mesh/Allwmake $*
+regionModels/Allwmake $OriginalOptions
+lagrangian/Allwmake $OriginalOptions
+postProcessing/Allwmake $OriginalOptions
+mesh/Allwmake $OriginalOptions
 
-fvAgglomerationMethods/Allwmake $*
+fvAgglomerationMethods/Allwmake $OriginalOptions
 
 wmake $makeType fvMotionSolver
 wmake $makeType engine
diff --git a/src/OSspecific/POSIX/Allwmake b/src/OSspecific/POSIX/Allwmake
index c68f089..15bedf5 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
+allwmakeOptions='-allow-inotify notificationMode' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 
 unset COMP_FLAGS LINK_FLAGS
 
@@ -9,7 +10,7 @@ unset COMP_FLAGS LINK_FLAGS
 #
 # eg,  ./Allwmake USE_STAT
 #
-if [ -f /usr/include/sys/inotify.h -a "${1%USE_STAT}" = "$1" ]
+if [ -f /usr/include/sys/inotify.h -a "${notificationMode%USE_STAT}" = "$notificationMode" ]
 then
     echo "Found <sys/inotify.h>  --  enabling inotify for file monitoring."
     export COMP_FLAGS="-DFOAM_USE_INOTIFY"
diff --git a/src/Pstream/Allwmake b/src/Pstream/Allwmake
index 50ccb5f..f321c23 100755
--- a/src/Pstream/Allwmake
+++ b/src/Pstream/Allwmake
@@ -1,7 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
-
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 
 #
 # define how to create an mpi-versioned library of $makeType
diff --git a/src/conversion/Allwmake b/src/conversion/Allwmake
index 014885d..db0e6f2 100755
--- a/src/conversion/Allwmake
+++ b/src/conversion/Allwmake
@@ -1,6 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake $makeType
diff --git a/src/dummyThirdParty/Allwmake b/src/dummyThirdParty/Allwmake
index d747a47..f9b9df3 100755
--- a/src/dummyThirdParty/Allwmake
+++ b/src/dummyThirdParty/Allwmake
@@ -1,6 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake $makeType scotchDecomp
diff --git a/src/fvAgglomerationMethods/Allwmake b/src/fvAgglomerationMethods/Allwmake
index aa03907..0d27bff 100755
--- a/src/fvAgglomerationMethods/Allwmake
+++ b/src/fvAgglomerationMethods/Allwmake
@@ -1,6 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 export ParMGridGen=$WM_THIRD_PARTY_DIR/ParMGridGen-1.0
diff --git a/src/lagrangian/Allwmake b/src/lagrangian/Allwmake
index bedfd29..7df0ad7 100755
--- a/src/lagrangian/Allwmake
+++ b/src/lagrangian/Allwmake
@@ -1,6 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake $makeType distributionModels
@@ -12,6 +12,6 @@ wmake $makeType dieselSpray
 wmake $makeType dsmc
 wmake $makeType coalCombustion
 
-molecularDynamics/Allwmake $*
+molecularDynamics/Allwmake $OriginalOptions
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/lagrangian/molecularDynamics/Allwmake b/src/lagrangian/molecularDynamics/Allwmake
index 7c17819..bd5dd8b 100755
--- a/src/lagrangian/molecularDynamics/Allwmake
+++ b/src/lagrangian/molecularDynamics/Allwmake
@@ -1,6 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake $makeType potential
diff --git a/src/mesh/Allwmake b/src/mesh/Allwmake
index 7120940..e4e9f92 100755
--- a/src/mesh/Allwmake
+++ b/src/mesh/Allwmake
@@ -1,6 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake $makeType autoMesh
diff --git a/src/parallel/Allwmake b/src/parallel/Allwmake
index ab84e5b..f088afd 100755
--- a/src/parallel/Allwmake
+++ b/src/parallel/Allwmake
@@ -1,10 +1,10 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
-decompose/Allwmake $*
-reconstruct/Allwmake $*
+decompose/Allwmake $OriginalOptions
+reconstruct/Allwmake $OriginalOptions
 wmake $makeType distributed
 
 
diff --git a/src/parallel/decompose/Allwmake b/src/parallel/decompose/Allwmake
index b620b27..63878b8 100755
--- a/src/parallel/decompose/Allwmake
+++ b/src/parallel/decompose/Allwmake
@@ -1,6 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 
 # 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..e99f649 100755
--- a/src/parallel/reconstruct/Allwmake
+++ b/src/parallel/reconstruct/Allwmake
@@ -1,6 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake $makeType reconstruct
diff --git a/src/postProcessing/Allwmake b/src/postProcessing/Allwmake
index 24b764c..c3accbe 100755
--- a/src/postProcessing/Allwmake
+++ b/src/postProcessing/Allwmake
@@ -1,11 +1,11 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake libo postCalc
 wmake $makeType foamCalcFunctions
 
-functionObjects/Allwmake $*
+functionObjects/Allwmake $OriginalOptions
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/postProcessing/functionObjects/Allwmake b/src/postProcessing/functionObjects/Allwmake
index e62cdf8..496e336 100755
--- a/src/postProcessing/functionObjects/Allwmake
+++ b/src/postProcessing/functionObjects/Allwmake
@@ -1,6 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake $makeType field
diff --git a/src/regionModels/Allwmake b/src/regionModels/Allwmake
index 5c97cae..4394c59 100755
--- a/src/regionModels/Allwmake
+++ b/src/regionModels/Allwmake
@@ -1,6 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake $makeType regionModel
diff --git a/src/thermophysicalModels/Allwmake b/src/thermophysicalModels/Allwmake
index 7927a97..69f74f9 100755
--- a/src/thermophysicalModels/Allwmake
+++ b/src/thermophysicalModels/Allwmake
@@ -1,12 +1,12 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake $makeType specie
 wmake $makeType solid
 wmake $makeType thermophysicalFunctions
-./properties/Allwmake $*
+./properties/Allwmake $OriginalOptions
 
 wmake $makeType basic
 wmake $makeType reactionThermo
diff --git a/src/thermophysicalModels/properties/Allwmake b/src/thermophysicalModels/properties/Allwmake
index f088d14..cf63d2b 100755
--- a/src/thermophysicalModels/properties/Allwmake
+++ b/src/thermophysicalModels/properties/Allwmake
@@ -1,6 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake $makeType liquidProperties
diff --git a/src/transportModels/Allwmake b/src/transportModels/Allwmake
index 21078c0..351bd1e 100755
--- a/src/transportModels/Allwmake
+++ b/src/transportModels/Allwmake
@@ -1,6 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake $makeType incompressible
diff --git a/src/turbulenceModels/Allwmake b/src/turbulenceModels/Allwmake
index 3cba27e..abfd728 100755
--- a/src/turbulenceModels/Allwmake
+++ b/src/turbulenceModels/Allwmake
@@ -1,11 +1,12 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
+
 set -x
 
-LES/Allwmake $*
-incompressible/Allwmake $*
-compressible/Allwmake $*
+LES/Allwmake $OriginalOptions
+incompressible/Allwmake $OriginalOptions
+compressible/Allwmake $OriginalOptions
 wmake $makeType derivedFvPatchFields
 
 # ----------------------------------------------------------------- end-of-file
diff --git a/src/turbulenceModels/LES/Allwmake b/src/turbulenceModels/LES/Allwmake
index 6ee54e6..e65f987 100755
--- a/src/turbulenceModels/LES/Allwmake
+++ b/src/turbulenceModels/LES/Allwmake
@@ -1,6 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmakeLnInclude ../incompressible/LES
diff --git a/src/turbulenceModels/compressible/Allwmake b/src/turbulenceModels/compressible/Allwmake
index 6e230c0..c8a4018 100755
--- a/src/turbulenceModels/compressible/Allwmake
+++ b/src/turbulenceModels/compressible/Allwmake
@@ -1,6 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake $makeType turbulenceModel
diff --git a/src/turbulenceModels/incompressible/Allwmake b/src/turbulenceModels/incompressible/Allwmake
index 6e230c0..c8a4018 100755
--- a/src/turbulenceModels/incompressible/Allwmake
+++ b/src/turbulenceModels/incompressible/Allwmake
@@ -1,6 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # run from this directory
-makeType=${1:-libso}
+allwmakeOptions='-allow-lib makeType' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
 set -x
 
 wmake $makeType turbulenceModel
diff --git a/wmake/scripts/AllwmakeArguments b/wmake/scripts/AllwmakeArguments
new file mode 100644
index 0000000..18e265a
--- /dev/null
+++ b/wmake/scripts/AllwmakeArguments
@@ -0,0 +1,219 @@
+#----------------------------------*-sh-*--------------------------------------
+# License
+#
+#     This file is part of a patch submitted here:
+#         http://www.openfoam.com/mantisbt/view.php?id=256
+#     It's licensed under the same license of the target software, namely GPL
+#     v3 or above (see <http://www.gnu.org/licenses/>).
+#
+# File
+#     wmake/scripts/AllwmakeArguments
+#
+# Description
+#     Parses arguments (options) sent to any Allwmake scripts that source this file.
+#     The variable "OriginalOptions" will save the original options, in case
+#   the Allwmake script needs them.
+#
+# Usage
+#     . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
+#  or
+#     allwmakeOptions='-allow-doc doDoxygen' && . $WM_PROJECT_DIR/wmake/scripts/AllwmakeArguments
+#
+# Valid arguments
+#   -h or -help    : shows a list of valid arguments and respective descriptions.
+#   -helpdev       : shows a list of hidden arguments and respective descriptions
+#                    relevant only to developers.
+#   -k or -nonstop : argument used for building without stopping when errors occur.
+#   -j or -j N     : argument used for either running with all available
+#                    cores/hyperthreads or with just N cores.
+#   -j+            : variant of the previous option, but running with all available
+#                    cores/hyperthreads + 1.
+#   -schedoff      : build without wmakeScheduler.
+#
+# Arguments for "allwmakeOptions"
+#   -allow-doc docvarname   : if "doc" is picked up later on during parsing, then
+#                             "docvarname" will be set to 1.
+#   -allow-lib libvarname   : if "lib", "libo" or "libso" are detected during parsing,
+#                             "libvarname" will be assigned that value.
+#   -allow-inotify varname  : if "USE_STAT" is detected, it will assigned to "varname".
+#   -allow-readline varname : if "NO_READLINE" is detected, it will assigned to "varname".
+#
+#------------------------------------------------------------------------------
+
+Script=${0##*/}
+OriginalOptions=$*
+
+usage() {
+    exec 1>&2
+    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
+
+    #show normal usage options
+    cat<<USAGE
+
+Usage: $Script [OPTIONS]
+
+options:
+  -h or -help       shows a list of valid options and respective descriptions
+  -helpdev          shows a list of hidden options and respective descriptions relevant only to developers
+  -k or -nonstop    option used for building without stopping when errors occur
+  -j , -jN or -j N  option used for either running with all available cores/hyperthreads or with just N cores
+  -j+               variant of the previous option, but running with all available cores/hyperthreads + 1 (optimum build speed)
+  -schedoff         build without wmakeScheduler
+USAGE
+
+    #show options for building code documentation
+    test -n "$doc_varname" && cat<<USAGE_DOC
+  doc               build code documentation (requires Doxygen to be installed)
+USAGE_DOC
+
+    #show options for building libraries
+    test -n "$lib_varname" && cat<<USAGE_LIB
+  lib               build statically linked archive lib (.a)
+  libo              build statically linked lib (.o)
+  libso             build dynamically linked lib (.so)
+USAGE_LIB
+
+    #show options for inotify/stat
+    test -n "$inotify_varname" && cat<<USAGE_INOTF
+  USE_STAT          don't use <sys/inotify.h> if found (Linux)
+USAGE_INOTF
+
+    #show options for readline
+    test -n "$readline_varname" && cat<<USAGE_RL
+  NO_READLINE       don't use <readline/readline.h> if found
+USAGE_RL
+    exit 1
+}
+
+usage_dev() {
+    exec 1>&2
+    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
+
+    #show options for developers
+    cat<<USAGE_DEV
+
+Options to be used only within Allwmake scripts via "allwmakeOptions":
+  -allow-doc docvarname      if "doc" is picked up later on during parsing, then "docvarname" will be set to 1.
+  -allow-lib libvarname      if "liba", "libo" or "libso" are detected during parsing, "libvarname" will be assigned that value.
+  -allow-inotify varname     if "USE_STAT" is detected, it will assigned to "varname".
+  -allow-readline varname    if "NO_READLINE" is detected, it will assigned to "varname".
+
+USAGE_DEV
+    exit 1
+}
+
+#based on ThirdParty-1.7.x/tools/makeThirdPartyFunctions
+getNCOMPPROCS()
+{
+    if [ -r /proc/cpuinfo ]
+    then
+        WM_NCOMPPROCS=$(egrep "^processor" /proc/cpuinfo | wc -l)
+        [ $WM_NCOMPPROCS -le 8 ] || WM_NCOMPPROCS=8
+    else
+        WM_NCOMPPROCS=1
+    fi
+
+    export WM_NCOMPPROCS
+}
+
+resetParser()
+{
+  optcount=0; opt1=""
+}
+
+unset doc_varname lib_varname inotify_varname readline_varname
+
+#parse internal options first
+resetParser
+for internalOpt in $allwmakeOptions
+do
+  if [ $optcount -eq 0 ]; then
+    opt1=$internalOpt
+    optcount=1
+  else
+    case "$opt1" in
+    -allow-doc)
+        doc_varname="$internalOpt"    # save "docvarname"
+        eval $doc_varname=0  #set libso as default option
+        ;;
+    -allow-lib)
+        lib_varname="$internalOpt"    # save "libvarname"
+        eval $lib_varname="libso"  #set libso as default option
+        ;;
+    -allow-inotify)
+        inotify_varname="$internalOpt"    # save "varname"
+        ;;
+    -allow-readline)
+        readline_varname="$internalOpt"    # save "varname"
+        ;;
+    *)
+        usage_dev "'$1' is an invalid internal option"
+        ;;
+    esac
+    resetParser
+  fi
+done
+
+# parse options
+while [ "$#" -gt 0 ]
+do
+    case "$1" in
+    -h | -help)
+        usage
+        ;;
+    -helpdev)
+        usage_dev
+        ;;
+    -j)
+        getNCOMPPROCS
+        test $# -ge 2 && expr $2 + 1 > /dev/null 2>&1 && shift && export WM_NCOMPPROCS=$1
+        echo "Building enabled for $WM_NCOMPPROCS cores"
+        ;;
+    -j+)
+        getNCOMPPROCS
+        export WM_NCOMPPROCS=`expr $WM_NCOMPPROCS + 1`
+        echo "Building enabled for $WM_NCOMPPROCS cores"
+        ;;
+    -j*)
+        export WM_NCOMPPROCS=${1#-j}
+        echo "Building enabled for $WM_NCOMPPROCS cores"
+        ;;
+    -k | -nonstop)
+        export WM_CONTINUE_ON_ERROR=1
+        ;;
+    -schedoff)
+        unset WM_SCHEDULER
+        ;;
+    doc)
+        test -n "$doc_varname" || usage "invalid option '$1'"
+        eval $doc_varname="$1"
+        ;;
+    lib | libo | libso)
+        test -n "$lib_varname" || usage "invalid option '$1'"
+        eval $lib_varname="$1"
+        ;;
+    USE_STAT)
+        test -n "$inotify_varname" || usage "invalid option '$1'"
+        eval $inotify_varname="$1"
+        ;;
+    NO_READLINE)
+        test -n "$readline_varname" || usage "invalid option '$1'"
+        eval $readline_varname="$1"
+        ;;
+    --)
+        shift
+        break
+        ;;
+    -* | *)
+        usage "invalid option '$1'"
+        ;;
+    esac
+    shift
+done
+
+#local cleanup
+unset getNCOMPPROCS usage optcount opt1 allwmakeOptions
+
+#if WM_CONTINUE_ON_ERROR has not been set, then
+#  activate the shell option "stop on error"
+[ -n "${WM_CONTINUE_ON_ERROR}" ] || set -e
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
