From 94e9b05eddb06721b3b3421314bb46b970aafafc Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Mon, 4 Apr 2016 09:03:40 +0100 Subject: [PATCH] applications/.*/Allwmake: Updated to support "stop on 1st error" Patch contributed by Bruno Santos Resolved bug-report http://www.openfoam.org/mantisbt/view.php?id=2042 --- .../solvers/compressible/rhoCentralFoam/Allwmake | 6 +++++- applications/solvers/lagrangian/DPMFoam/Allwmake | 7 +++++-- .../multiphase/compressibleInterFoam/Allwmake | 6 +++++- .../compressibleMultiphaseInterFoam/Allwmake | 6 +++++- .../solvers/multiphase/driftFluxFoam/Allwmake | 8 ++++++-- .../multiphase/interPhaseChangeFoam/Allwmake | 6 +++++- .../multiphase/multiphaseEulerFoam/Allwmake | 8 ++++++-- .../multiphase/multiphaseInterFoam/Allwmake | 6 +++++- .../solvers/multiphase/reactingEulerFoam/Allwmake | 14 +++++++++----- .../reactingMultiphaseEulerFoam/Allwmake | 8 ++++++-- .../reactingTwoPhaseEulerFoam/Allwmake | 8 ++++++-- .../solvers/multiphase/twoPhaseEulerFoam/Allwmake | 10 +++++++--- .../utilities/mesh/conversion/Optional/Allwmake | 3 +++ applications/utilities/mesh/generation/Allwmake | 5 ++++- .../mesh/generation/extrude2DMesh/Allwmake | 6 +++++- .../utilities/mesh/generation/foamyMesh/Allwmake | 8 ++++++-- .../foamyHexMeshSurfaceSimplify/Allwmake | 3 +++ .../mesh/manipulation/renumberMesh/Allwmake | 4 ++++ .../utilities/mesh/manipulation/setSet/Allwmake | 3 +++ .../utilities/miscellaneous/foamHelp/Allwmake | 7 ++++++- .../dataConversion/foamToTecplot360/Allwmake | 3 +++ .../postProcessing/graphics/PV3Readers/Allwmake | 10 +++++++--- .../graphics/PV3Readers/PV3FoamReader/Allwmake | 6 +++++- .../PV3Readers/PV3blockMeshReader/Allwmake | 6 +++++- .../postProcessing/graphics/PVReaders/Allwmake | 10 +++++++--- .../graphics/PVReaders/PVFoamReader/Allwmake | 6 +++++- .../graphics/PVReaders/PVblockMeshReader/Allwmake | 6 +++++- .../graphics/ensightFoamReader/Allwmake | 6 +++++- .../preProcessing/wallFunctionTable/Allwmake | 6 +++++- wmake/wmake | 15 +++++++++++---- 30 files changed, 162 insertions(+), 44 deletions(-) diff --git a/applications/solvers/compressible/rhoCentralFoam/Allwmake b/applications/solvers/compressible/rhoCentralFoam/Allwmake index 6595a83131..c85e459457 100755 --- a/applications/solvers/compressible/rhoCentralFoam/Allwmake +++ b/applications/solvers/compressible/rhoCentralFoam/Allwmake @@ -1,7 +1,11 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x -(wmake libso BCs && wmake && wmake rhoCentralDyMFoam) +(wmake $targetType BCs && wmake && wmake rhoCentralDyMFoam) #------------------------------------------------------------------------------ diff --git a/applications/solvers/lagrangian/DPMFoam/Allwmake b/applications/solvers/lagrangian/DPMFoam/Allwmake index 8a47fb1b34..f3f30648d5 100755 --- a/applications/solvers/lagrangian/DPMFoam/Allwmake +++ b/applications/solvers/lagrangian/DPMFoam/Allwmake @@ -1,8 +1,11 @@ #!/bin/sh - cd ${0%/*} || exit 1 + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x -wmake libso DPMTurbulenceModels +wmake $targetType DPMTurbulenceModels wmake wmake MPPICFoam diff --git a/applications/solvers/multiphase/compressibleInterFoam/Allwmake b/applications/solvers/multiphase/compressibleInterFoam/Allwmake index bb1b0dd691..b658bde457 100755 --- a/applications/solvers/multiphase/compressibleInterFoam/Allwmake +++ b/applications/solvers/multiphase/compressibleInterFoam/Allwmake @@ -1,8 +1,12 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x -wmake libso twoPhaseMixtureThermo +wmake $targetType twoPhaseMixtureThermo wmake wmake compressibleInterDyMFoam diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwmake b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwmake index a92a8ae36b..025a2399e8 100755 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwmake +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwmake @@ -1,8 +1,12 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x -wmake libso multiphaseMixtureThermo +wmake $targetType multiphaseMixtureThermo wmake #------------------------------------------------------------------------------ diff --git a/applications/solvers/multiphase/driftFluxFoam/Allwmake b/applications/solvers/multiphase/driftFluxFoam/Allwmake index 4d4db5f280..0c8b6bb8f9 100755 --- a/applications/solvers/multiphase/driftFluxFoam/Allwmake +++ b/applications/solvers/multiphase/driftFluxFoam/Allwmake @@ -1,9 +1,13 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x -wmake libso mixtureViscosityModels -wmake libso relativeVelocityModels +wmake $targetType mixtureViscosityModels +wmake $targetType relativeVelocityModels wmake #------------------------------------------------------------------------------ diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake b/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake index 2f57fe3752..c25175e5e6 100755 --- a/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake +++ b/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake @@ -1,8 +1,12 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x -wmake libso phaseChangeTwoPhaseMixtures +wmake $targetType phaseChangeTwoPhaseMixtures wmake wmake interPhaseChangeDyMFoam diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake b/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake index 885d5ed2a0..6f95f807ac 100755 --- a/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake +++ b/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake @@ -1,10 +1,14 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x wmakeLnInclude interfacialModels -wmake libso multiphaseSystem -wmake libso interfacialModels +wmake $targetType multiphaseSystem +wmake $targetType interfacialModels wmake #------------------------------------------------------------------------------ diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Allwmake b/applications/solvers/multiphase/multiphaseInterFoam/Allwmake index 049217716c..4d2775a8b8 100755 --- a/applications/solvers/multiphase/multiphaseInterFoam/Allwmake +++ b/applications/solvers/multiphase/multiphaseInterFoam/Allwmake @@ -1,8 +1,12 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x -wmake libso multiphaseMixture +wmake $targetType multiphaseMixture wmake wmake multiphaseInterDyMFoam diff --git a/applications/solvers/multiphase/reactingEulerFoam/Allwmake b/applications/solvers/multiphase/reactingEulerFoam/Allwmake index c67ed9a196..0757f76b3f 100755 --- a/applications/solvers/multiphase/reactingEulerFoam/Allwmake +++ b/applications/solvers/multiphase/reactingEulerFoam/Allwmake @@ -1,13 +1,17 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x wmakeLnInclude interfacialModels wmakeLnInclude interfacialCompositionModels -wmake libso phaseSystems -wmake libso interfacialModels -wmake libso interfacialCompositionModels -reactingTwoPhaseEulerFoam/Allwmake -reactingMultiphaseEulerFoam/Allwmake +wmake $targetType phaseSystems +wmake $targetType interfacialModels +wmake $targetType interfacialCompositionModels +reactingTwoPhaseEulerFoam/Allwmake $* +reactingMultiphaseEulerFoam/Allwmake $* #------------------------------------------------------------------------------ diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwmake b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwmake index a18671b330..42f430bf17 100755 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwmake +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwmake @@ -1,9 +1,13 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x -wmake libso multiphaseSystem -wmake libso multiphaseCompressibleTurbulenceModels +wmake $targetType multiphaseSystem +wmake $targetType multiphaseCompressibleTurbulenceModels wmake #------------------------------------------------------------------------------ diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwmake b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwmake index 44268bcb63..a0ff46153a 100755 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwmake +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwmake @@ -1,9 +1,13 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x -wmake libso twoPhaseSystem -wmake libso twoPhaseCompressibleTurbulenceModels +wmake $targetType twoPhaseSystem +wmake $targetType twoPhaseCompressibleTurbulenceModels wmake #------------------------------------------------------------------------------ diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake index dc726c0806..16e2ad39ab 100755 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake @@ -1,11 +1,15 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x wmakeLnInclude interfacialModels -wmake libso twoPhaseSystem -wmake libso interfacialModels -wmake libso phaseCompressibleTurbulenceModels +wmake $targetType twoPhaseSystem +wmake $targetType interfacialModels +wmake $targetType phaseCompressibleTurbulenceModels wmake #------------------------------------------------------------------------------ diff --git a/applications/utilities/mesh/conversion/Optional/Allwmake b/applications/utilities/mesh/conversion/Optional/Allwmake index 5de68c197b..cb0064789a 100755 --- a/applications/utilities/mesh/conversion/Optional/Allwmake +++ b/applications/utilities/mesh/conversion/Optional/Allwmake @@ -3,6 +3,9 @@ # Build optional components (eg, may depend on third-party libraries) #------------------------------------------------------------------------------ cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for compilation (at least for error catching) +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x # build libccmio and create lnInclude directory diff --git a/applications/utilities/mesh/generation/Allwmake b/applications/utilities/mesh/generation/Allwmake index f6f56de5d6..2211a8c0b9 100755 --- a/applications/utilities/mesh/generation/Allwmake +++ b/applications/utilities/mesh/generation/Allwmake @@ -1,6 +1,9 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory +# Parse arguments for compilation (at least for error catching) +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments + # Get CGAL and boost versions . $WM_PROJECT_DIR/etc/config.sh/functions _foamEval SOURCE_CGAL_VERSIONS_ONLY=yes \ @@ -15,7 +18,7 @@ wmake -all snappyHexMesh if [ -n "$CGAL_ARCH_PATH" -o "$cgal_version" = "cgal-system" ] then - foamyMesh/Allwmake + foamyMesh/Allwmake $* fi diff --git a/applications/utilities/mesh/generation/extrude2DMesh/Allwmake b/applications/utilities/mesh/generation/extrude2DMesh/Allwmake index e6514878d8..72ed5c7d1e 100755 --- a/applications/utilities/mesh/generation/extrude2DMesh/Allwmake +++ b/applications/utilities/mesh/generation/extrude2DMesh/Allwmake @@ -1,8 +1,12 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x -wmake libso extrude2DMesh +wmake $targetType extrude2DMesh wmake #------------------------------------------------------------------------------ diff --git a/applications/utilities/mesh/generation/foamyMesh/Allwmake b/applications/utilities/mesh/generation/foamyMesh/Allwmake index e49feb0370..17241fde08 100755 --- a/applications/utilities/mesh/generation/foamyMesh/Allwmake +++ b/applications/utilities/mesh/generation/foamyMesh/Allwmake @@ -1,9 +1,13 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x -wmake libso conformalVoronoiMesh -wmake libso conformalVoronoi2DMesh +wmake $targetType conformalVoronoiMesh +wmake $targetType conformalVoronoi2DMesh wmake foamyQuadMesh wmake foamyHexMesh #wmake foamyHexMeshBackgroundMesh diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/Allwmake b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/Allwmake index 0a6b103673..5a714fca98 100755 --- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/Allwmake +++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshSurfaceSimplify/Allwmake @@ -1,5 +1,8 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for compilation (at least for error catching) +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x if [ -d "${FASTDUALOCTREE_SRC_PATH}" ] diff --git a/applications/utilities/mesh/manipulation/renumberMesh/Allwmake b/applications/utilities/mesh/manipulation/renumberMesh/Allwmake index 9119e05f12..34b8b78d2f 100755 --- a/applications/utilities/mesh/manipulation/renumberMesh/Allwmake +++ b/applications/utilities/mesh/manipulation/renumberMesh/Allwmake @@ -1,6 +1,10 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory +# Parse arguments for compilation (at least for error catching) +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments +set -x + export COMPILE_FLAGS='' export LINK_FLAGS='' diff --git a/applications/utilities/mesh/manipulation/setSet/Allwmake b/applications/utilities/mesh/manipulation/setSet/Allwmake index 5dbfd208ce..2822be02b8 100755 --- a/applications/utilities/mesh/manipulation/setSet/Allwmake +++ b/applications/utilities/mesh/manipulation/setSet/Allwmake @@ -1,6 +1,9 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory +# Parse arguments for compilation (at least for error catching) +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments + unset COMP_FLAGS LINK_FLAGS # diff --git a/applications/utilities/miscellaneous/foamHelp/Allwmake b/applications/utilities/miscellaneous/foamHelp/Allwmake index ba37c5e418..2c97cd692f 100755 --- a/applications/utilities/miscellaneous/foamHelp/Allwmake +++ b/applications/utilities/miscellaneous/foamHelp/Allwmake @@ -1,7 +1,12 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory -wmake libso helpTypes +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments +set -x + +wmake $targetType helpTypes wmake diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake index 86a7c89e3a..df9634c112 100755 --- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake +++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake @@ -1,6 +1,9 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory +# Parse arguments for application compilation (at least for error control) +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments + if [ ! -d ${WM_THIRD_PARTY_DIR}/tecio ] then echo "Did not find tecio in ${WM_THIRD_PARTY_DIR}. Not building foamToTecplot360." diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake index 5172a62ae3..049c1bfca0 100755 --- a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake +++ b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake @@ -1,5 +1,9 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments #set -x case "$ParaView_VERSION" in @@ -14,9 +18,9 @@ case "$ParaView_VERSION" in # ensure CMake gets the correct C++ compiler [ -n "$WM_CXX" ] && export CXX="$WM_CXX" - wmake libso vtkPV3Readers - PV3blockMeshReader/Allwmake - PV3FoamReader/Allwmake + wmake $targetType vtkPV3Readers + PV3blockMeshReader/Allwmake $* + PV3FoamReader/Allwmake $* else echo "ERROR: ParaView not found in $ParaView_DIR" fi diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake index 407f29b642..08602d37ed 100755 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake @@ -1,10 +1,14 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] then - wmake libso vtkPV3Foam + wmake $targetType vtkPV3Foam ( cd PV3FoamReader mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake index ad66b2b71f..48e136d209 100755 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake @@ -1,10 +1,14 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] then - wmake libso vtkPV3blockMesh + wmake $targetType vtkPV3blockMesh ( cd PV3blockMeshReader mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 diff --git a/applications/utilities/postProcessing/graphics/PVReaders/Allwmake b/applications/utilities/postProcessing/graphics/PVReaders/Allwmake index ecba083285..edaa31a37b 100755 --- a/applications/utilities/postProcessing/graphics/PVReaders/Allwmake +++ b/applications/utilities/postProcessing/graphics/PVReaders/Allwmake @@ -1,5 +1,9 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments #set -x case "$ParaView_VERSION" in @@ -14,9 +18,9 @@ case "$ParaView_VERSION" in # ensure CMake gets the correct C++ compiler [ -n "$WM_CXX" ] && export CXX="$WM_CXX" - wmake libso vtkPVReaders - PVblockMeshReader/Allwmake - PVFoamReader/Allwmake + wmake $targetType vtkPVReaders + PVblockMeshReader/Allwmake $* + PVFoamReader/Allwmake $* else echo "ERROR: ParaView not found in $ParaView_DIR" fi diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwmake b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwmake index 44af3551f1..70b8845d4b 100755 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwmake +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/Allwmake @@ -1,10 +1,14 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] then - wmake libso vtkPVFoam + wmake $targetType vtkPVFoam ( cd PVFoamReader mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwmake b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwmake index ca9cb6105d..54b75743f9 100755 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwmake +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/Allwmake @@ -1,10 +1,14 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] then - wmake libso vtkPVblockMesh + wmake $targetType vtkPVblockMesh ( cd PVblockMeshReader mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake b/applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake index 4fe5a6e9e7..7a5f1a0863 100755 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/Allwmake @@ -1,6 +1,10 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory -wmake libso +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments + +wmake $targetType #------------------------------------------------------------------------------ diff --git a/applications/utilities/preProcessing/wallFunctionTable/Allwmake b/applications/utilities/preProcessing/wallFunctionTable/Allwmake index 0d1c099d1d..63dbf325be 100755 --- a/applications/utilities/preProcessing/wallFunctionTable/Allwmake +++ b/applications/utilities/preProcessing/wallFunctionTable/Allwmake @@ -1,8 +1,12 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory + +# Parse arguments for library compilation +targetType=libso +. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments set -x -wmake libso tabulatedWallFunction +wmake $targetType tabulatedWallFunction wmake #------------------------------------------------------------------------------ diff --git a/wmake/wmake b/wmake/wmake index 623a15fcdd..c09088b99f 100755 --- a/wmake/wmake +++ b/wmake/wmake @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------- # License @@ -219,6 +219,9 @@ then ./Allwmake exit $? else + # Have to keep track of the main exit code for the call to "make" + makeExitCode=0 + # Find all the sub-directories containing a 'Make' directory FOAM_APPS=$(\ for d in *; \ @@ -232,13 +235,17 @@ then $make ${WM_CONTINUE_ON_ERROR:+-k} \ -f $WM_DIR/makefiles/apps \ TARGET="$targetType" FOAM_APPS="$FOAM_APPS" + makeExitCode=$? fi # If the current directory contains a 'Make' directory continue - # otherwise exit - if [ ! -d $MakeDir ] + # otherwise exit, or always exit in case of error + if [ ! -d $MakeDir -o $makeExitCode -ne 0 ] then - exit $? + exit $makeExitCode fi + + # Clean up tracking variable + unset makeExitCode fi fi