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
This commit is contained in:
Henry Weller
2016-04-04 09:03:40 +01:00
parent 1fbd362faa
commit 94e9b05edd
30 changed files with 162 additions and 44 deletions

View File

@ -1,7 +1,11 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
(wmake libso BCs && wmake && wmake rhoCentralDyMFoam) (wmake $targetType BCs && wmake && wmake rhoCentralDyMFoam)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -1,8 +1,11 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 cd ${0%/*} || exit 1
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
wmake libso DPMTurbulenceModels wmake $targetType DPMTurbulenceModels
wmake wmake
wmake MPPICFoam wmake MPPICFoam

View File

@ -1,8 +1,12 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
wmake libso twoPhaseMixtureThermo wmake $targetType twoPhaseMixtureThermo
wmake wmake
wmake compressibleInterDyMFoam wmake compressibleInterDyMFoam

View File

@ -1,8 +1,12 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
wmake libso multiphaseMixtureThermo wmake $targetType multiphaseMixtureThermo
wmake wmake
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -1,9 +1,13 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
wmake libso mixtureViscosityModels wmake $targetType mixtureViscosityModels
wmake libso relativeVelocityModels wmake $targetType relativeVelocityModels
wmake wmake
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -1,8 +1,12 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
wmake libso phaseChangeTwoPhaseMixtures wmake $targetType phaseChangeTwoPhaseMixtures
wmake wmake
wmake interPhaseChangeDyMFoam wmake interPhaseChangeDyMFoam

View File

@ -1,10 +1,14 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
wmakeLnInclude interfacialModels wmakeLnInclude interfacialModels
wmake libso multiphaseSystem wmake $targetType multiphaseSystem
wmake libso interfacialModels wmake $targetType interfacialModels
wmake wmake
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -1,8 +1,12 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
wmake libso multiphaseMixture wmake $targetType multiphaseMixture
wmake wmake
wmake multiphaseInterDyMFoam wmake multiphaseInterDyMFoam

View File

@ -1,13 +1,17 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
wmakeLnInclude interfacialModels wmakeLnInclude interfacialModels
wmakeLnInclude interfacialCompositionModels wmakeLnInclude interfacialCompositionModels
wmake libso phaseSystems wmake $targetType phaseSystems
wmake libso interfacialModels wmake $targetType interfacialModels
wmake libso interfacialCompositionModels wmake $targetType interfacialCompositionModels
reactingTwoPhaseEulerFoam/Allwmake reactingTwoPhaseEulerFoam/Allwmake $*
reactingMultiphaseEulerFoam/Allwmake reactingMultiphaseEulerFoam/Allwmake $*
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -1,9 +1,13 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
wmake libso multiphaseSystem wmake $targetType multiphaseSystem
wmake libso multiphaseCompressibleTurbulenceModels wmake $targetType multiphaseCompressibleTurbulenceModels
wmake wmake
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -1,9 +1,13 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
wmake libso twoPhaseSystem wmake $targetType twoPhaseSystem
wmake libso twoPhaseCompressibleTurbulenceModels wmake $targetType twoPhaseCompressibleTurbulenceModels
wmake wmake
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -1,11 +1,15 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
wmakeLnInclude interfacialModels wmakeLnInclude interfacialModels
wmake libso twoPhaseSystem wmake $targetType twoPhaseSystem
wmake libso interfacialModels wmake $targetType interfacialModels
wmake libso phaseCompressibleTurbulenceModels wmake $targetType phaseCompressibleTurbulenceModels
wmake wmake
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -3,6 +3,9 @@
# Build optional components (eg, may depend on third-party libraries) # Build optional components (eg, may depend on third-party libraries)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
cd ${0%/*} || exit 1 # Run from this directory 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 set -x
# build libccmio and create lnInclude directory # build libccmio and create lnInclude directory

View File

@ -1,6 +1,9 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory 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 # Get CGAL and boost versions
. $WM_PROJECT_DIR/etc/config.sh/functions . $WM_PROJECT_DIR/etc/config.sh/functions
_foamEval SOURCE_CGAL_VERSIONS_ONLY=yes \ _foamEval SOURCE_CGAL_VERSIONS_ONLY=yes \
@ -15,7 +18,7 @@ wmake -all snappyHexMesh
if [ -n "$CGAL_ARCH_PATH" -o "$cgal_version" = "cgal-system" ] if [ -n "$CGAL_ARCH_PATH" -o "$cgal_version" = "cgal-system" ]
then then
foamyMesh/Allwmake foamyMesh/Allwmake $*
fi fi

View File

@ -1,8 +1,12 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
wmake libso extrude2DMesh wmake $targetType extrude2DMesh
wmake wmake
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -1,9 +1,13 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
wmake libso conformalVoronoiMesh wmake $targetType conformalVoronoiMesh
wmake libso conformalVoronoi2DMesh wmake $targetType conformalVoronoi2DMesh
wmake foamyQuadMesh wmake foamyQuadMesh
wmake foamyHexMesh wmake foamyHexMesh
#wmake foamyHexMeshBackgroundMesh #wmake foamyHexMeshBackgroundMesh

View File

@ -1,5 +1,8 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory 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 set -x
if [ -d "${FASTDUALOCTREE_SRC_PATH}" ] if [ -d "${FASTDUALOCTREE_SRC_PATH}" ]

View File

@ -1,6 +1,10 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory 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 COMPILE_FLAGS=''
export LINK_FLAGS='' export LINK_FLAGS=''

View File

@ -1,6 +1,9 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory 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 unset COMP_FLAGS LINK_FLAGS
# #

View File

@ -1,7 +1,12 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory 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 wmake

View File

@ -1,6 +1,9 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory 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 ] if [ ! -d ${WM_THIRD_PARTY_DIR}/tecio ]
then then
echo "Did not find tecio in ${WM_THIRD_PARTY_DIR}. Not building foamToTecplot360." echo "Did not find tecio in ${WM_THIRD_PARTY_DIR}. Not building foamToTecplot360."

View File

@ -1,5 +1,9 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
#set -x #set -x
case "$ParaView_VERSION" in case "$ParaView_VERSION" in
@ -14,9 +18,9 @@ case "$ParaView_VERSION" in
# ensure CMake gets the correct C++ compiler # ensure CMake gets the correct C++ compiler
[ -n "$WM_CXX" ] && export CXX="$WM_CXX" [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
wmake libso vtkPV3Readers wmake $targetType vtkPV3Readers
PV3blockMeshReader/Allwmake PV3blockMeshReader/Allwmake $*
PV3FoamReader/Allwmake PV3FoamReader/Allwmake $*
else else
echo "ERROR: ParaView not found in $ParaView_DIR" echo "ERROR: ParaView not found in $ParaView_DIR"
fi fi

View File

@ -1,10 +1,14 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
then then
wmake libso vtkPV3Foam wmake $targetType vtkPV3Foam
( (
cd PV3FoamReader cd PV3FoamReader
mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1

View File

@ -1,10 +1,14 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
then then
wmake libso vtkPV3blockMesh wmake $targetType vtkPV3blockMesh
( (
cd PV3blockMeshReader cd PV3blockMeshReader
mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1

View File

@ -1,5 +1,9 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
#set -x #set -x
case "$ParaView_VERSION" in case "$ParaView_VERSION" in
@ -14,9 +18,9 @@ case "$ParaView_VERSION" in
# ensure CMake gets the correct C++ compiler # ensure CMake gets the correct C++ compiler
[ -n "$WM_CXX" ] && export CXX="$WM_CXX" [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
wmake libso vtkPVReaders wmake $targetType vtkPVReaders
PVblockMeshReader/Allwmake PVblockMeshReader/Allwmake $*
PVFoamReader/Allwmake PVFoamReader/Allwmake $*
else else
echo "ERROR: ParaView not found in $ParaView_DIR" echo "ERROR: ParaView not found in $ParaView_DIR"
fi fi

View File

@ -1,10 +1,14 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
then then
wmake libso vtkPVFoam wmake $targetType vtkPVFoam
( (
cd PVFoamReader cd PVFoamReader
mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1

View File

@ -1,10 +1,14 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
then then
wmake libso vtkPVblockMesh wmake $targetType vtkPVblockMesh
( (
cd PVblockMeshReader cd PVblockMeshReader
mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1

View File

@ -1,6 +1,10 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory 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
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -1,8 +1,12 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
wmake libso tabulatedWallFunction wmake $targetType tabulatedWallFunction
wmake wmake
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -3,7 +3,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# License # License
@ -219,6 +219,9 @@ then
./Allwmake ./Allwmake
exit $? exit $?
else 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 # Find all the sub-directories containing a 'Make' directory
FOAM_APPS=$(\ FOAM_APPS=$(\
for d in *; \ for d in *; \
@ -232,13 +235,17 @@ then
$make ${WM_CONTINUE_ON_ERROR:+-k} \ $make ${WM_CONTINUE_ON_ERROR:+-k} \
-f $WM_DIR/makefiles/apps \ -f $WM_DIR/makefiles/apps \
TARGET="$targetType" FOAM_APPS="$FOAM_APPS" TARGET="$targetType" FOAM_APPS="$FOAM_APPS"
makeExitCode=$?
fi fi
# If the current directory contains a 'Make' directory continue # If the current directory contains a 'Make' directory continue
# otherwise exit # otherwise exit, or always exit in case of error
if [ ! -d $MakeDir ] if [ ! -d $MakeDir -o $makeExitCode -ne 0 ]
then then
exit $? exit $makeExitCode
fi fi
# Clean up tracking variable
unset makeExitCode
fi fi
fi fi