From 608bb5d83b3a711c0568a8034bfda2435dc5c457 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 22 Dec 2016 11:26:29 +0100 Subject: [PATCH] COMP: update lnInclude directories when building (issue #364) - Could be related to interrupted builds. So if there are any parts of the build that rely on an explicit 'wmakeLnInclude', make sure that the contents are properly updated. -- ENH: improved feedback from top-level Allwmake - Report which section (libraries, applications) is being built. - Provide final summary of date, version, etc, which can be helpful for later diagnosis or record keeping. - The -log=XXX option for Allwmake now accepts a directory name and automatically appends an appropriate log name. Eg, ./Allwmake -log=logs/ ->> logs/log.linux64GccDPInt32Opt The default name is built from the value of WM_OPTIONS. -- BUG: shell not exiting properly in combination with -log option - the use of 'tee' causes the shell to hang around. Added an explicit exit to catch this. -- - Detecting the '-k' (-non-stop) option at the top-level Allwmake, which may improve robustness. - Explicit continue-on-error for foamyMesh (as optional component) - unify format of script messages for better readability COMP: reduce warnings when building Pstream (old-style casts in openmpi) --- Allwmake | 19 ++++- applications/solvers/DNS/dnsFoam/Allwmake | 4 +- .../utilities/mesh/conversion/ccm/Allwmake | 4 +- .../mesh/generation/foamyMesh/Allwmake | 6 ++ .../graphics/PVReaders/Allwclean | 1 - .../graphics/PVReaders/Allwmake | 18 ++--- .../utilities/postProcessing/noise/Allwmake | 4 +- .../utilities/preProcessing/boxTurb/Allwmake | 4 +- src/Allwmake | 6 +- src/Pstream/mpi/Make/options | 2 +- src/TurbulenceModels/Allwmake | 4 +- src/conversion/Allwmake | 8 +- src/conversion/ccm/Allwmake | 29 +++---- .../graphics/runTimePostProcessing/Allwmake | 3 - src/parallel/decompose/Allwmake | 75 ++++++++----------- src/parallel/decompose/AllwmakeLnInclude | 8 +- src/randomProcesses/Allwmake | 7 +- src/renumber/Allwmake | 18 ++--- wmake/scripts/AllwmakeParseArguments | 25 ++++++- 19 files changed, 121 insertions(+), 124 deletions(-) diff --git a/Allwmake b/Allwmake index 67c26d0a3d..28955d1c95 100755 --- a/Allwmake +++ b/Allwmake @@ -25,14 +25,25 @@ if [ -d "$WM_THIRD_PARTY_DIR" ] then $WM_THIRD_PARTY_DIR/Allwmake else - echo "Allwmake: no ThirdParty directory found - skipping" + echo "No ThirdParty directory found - skipping" fi -# Compile OpenFOAM libraries and applications +echo "========================================" +echo "Compile OpenFOAM libraries" +echo src/Allwmake $targetType $* -# Compile OpenFOAM libraries and applications +echo "========================================" +echo "Compile OpenFOAM applications" +echo applications/Allwmake $targetType $* - +# Some summary information +echo +/usr/bin/date +echo "========================================" +echo " ${WM_PROJECT_DIR##*/}" +echo " $WM_COMPILER $WM_COMPILER_TYPE compiler" +echo " ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}" +echo #------------------------------------------------------------------------------ diff --git a/applications/solvers/DNS/dnsFoam/Allwmake b/applications/solvers/DNS/dnsFoam/Allwmake index 759041a131..615be6fcc0 100755 --- a/applications/solvers/DNS/dnsFoam/Allwmake +++ b/applications/solvers/DNS/dnsFoam/Allwmake @@ -6,9 +6,7 @@ if [ -f "$FFTW_ARCH_PATH/include/fftw3.h" ] || \ then wmake else - echo - echo "Skipping dnsFoam solver (no FFTW)" - echo + echo "==> skip dnsFoam solver (no FFTW)" fi #------------------------------------------------------------------------------ diff --git a/applications/utilities/mesh/conversion/ccm/Allwmake b/applications/utilities/mesh/conversion/ccm/Allwmake index 7f59349f93..f0062c9774 100755 --- a/applications/utilities/mesh/conversion/ccm/Allwmake +++ b/applications/utilities/mesh/conversion/ccm/Allwmake @@ -7,11 +7,11 @@ cd ${0%/*} || exit 1 # Run from this directory # Only build if libraries already exist if [ -e $FOAM_LIBBIN/libccm.so ] then - echo "Building optional ccm conversion components." + echo "==> build optional ccm conversion components" wmake $targetType ccmToFoam wmake $targetType foamToCcm else - echo "Skipping optional ccm conversion components (no libccm.so)." + echo "==> skip optional ccm conversion components (no libccm.so)" fi #------------------------------------------------------------------------------ diff --git a/applications/utilities/mesh/generation/foamyMesh/Allwmake b/applications/utilities/mesh/generation/foamyMesh/Allwmake index bea4106ad3..6c838e5f09 100755 --- a/applications/utilities/mesh/generation/foamyMesh/Allwmake +++ b/applications/utilities/mesh/generation/foamyMesh/Allwmake @@ -1,6 +1,11 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory +# Optional unit: continue-on-error +# - may not have CGAL installed, +# - or the CGAL installation moved and gives CMake problems +export WM_CONTINUE_ON_ERROR=true + # Parse arguments for library compilation . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments @@ -14,6 +19,7 @@ then # wmake foamyHexMeshBackgroundMesh # (cd foamyHexMeshSurfaceSimplify && ./Allwmake) # wmake cellSizeAndAlignmentGrid + echo "Finish ${PWD##*/}" # Also for a clean exit code else echo "WARNING: cannot build ${PWD##*/} without CGAL" fi diff --git a/applications/utilities/postProcessing/graphics/PVReaders/Allwclean b/applications/utilities/postProcessing/graphics/PVReaders/Allwclean index 89cadd3040..23ec661742 100755 --- a/applications/utilities/postProcessing/graphics/PVReaders/Allwclean +++ b/applications/utilities/postProcessing/graphics/PVReaders/Allwclean @@ -1,6 +1,5 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory -#set -x wclean libso vtkPVReaders PVblockMeshReader/Allwclean diff --git a/applications/utilities/postProcessing/graphics/PVReaders/Allwmake b/applications/utilities/postProcessing/graphics/PVReaders/Allwmake index 20d389f5c9..df34613a03 100755 --- a/applications/utilities/postProcessing/graphics/PVReaders/Allwmake +++ b/applications/utilities/postProcessing/graphics/PVReaders/Allwmake @@ -8,31 +8,25 @@ export WM_CONTINUE_ON_ERROR=true . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments # -# There are several prerequisites for building a plugin +# There are several prerequisites for building plugins # #set -x canBuildPlugin() { [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] || { - echo - echo "WARNING: cannot build ParaView plugin(s) without paraview directory" + echo "==> cannot build ParaView plugins without paraview directory" echo " ParaView_DIR=$ParaView_DIR" - echo return 1 } [ -n "$PV_PLUGIN_PATH" ] || { - echo - echo "${PWD##*/} : invalid PV_PLUGIN_PATH for building ParaView plugin(s)" + echo "==> ${PWD##*/} : invalid PV_PLUGIN_PATH for building ParaView plugins" echo " PV_PLUGIN_PATH=${PV_PLUGIN_PATH:-unset}" - echo return 1 } type cmake > /dev/null 2>&1 || { - echo - echo "WARNING: cannot build ParaView plugin(s) without cmake" - echo + echo "==> cannot build ParaView plugins without cmake" return 1 } @@ -62,10 +56,8 @@ case "$major" in fi ;; *) - echo - echo "NOTE: skipping build of ParaView plugin(s)" + echo "==> skip build of ParaView plugins" echo " include directory was for paraview major version '${major:-none}'" - echo ;; esac diff --git a/applications/utilities/postProcessing/noise/Allwmake b/applications/utilities/postProcessing/noise/Allwmake index 84c6a2ac82..f1cf077bb1 100755 --- a/applications/utilities/postProcessing/noise/Allwmake +++ b/applications/utilities/postProcessing/noise/Allwmake @@ -6,9 +6,7 @@ if [ -f "$FFTW_ARCH_PATH/include/fftw3.h" ] || \ then wmake else - echo - echo "Skipping noise utility (no FFTW)" - echo + echo "==> skip noise utility (no FFTW)" fi #------------------------------------------------------------------------------ diff --git a/applications/utilities/preProcessing/boxTurb/Allwmake b/applications/utilities/preProcessing/boxTurb/Allwmake index 46d04eebf5..e4921f5485 100755 --- a/applications/utilities/preProcessing/boxTurb/Allwmake +++ b/applications/utilities/preProcessing/boxTurb/Allwmake @@ -6,9 +6,7 @@ if [ -f "$FFTW_ARCH_PATH/include/fftw3.h" ] || \ then wmake else - echo - echo "Skipping boxTurb utility (no FFTW)" - echo + echo "==> skip boxTurb utility (no FFTW)" fi #------------------------------------------------------------------------------ diff --git a/src/Allwmake b/src/Allwmake index 949c32b5da..000688c332 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -20,8 +20,8 @@ wmakeCheckPwd "$WM_PROJECT_DIR/src" || { # Update OpenFOAM version strings if required wmakePrintBuild -check || wrmo OpenFOAM/global/global.o 2>/dev/null -wmakeLnInclude OpenFOAM -wmakeLnInclude OSspecific/${WM_OSTYPE:-POSIX} +wmakeLnInclude -u OpenFOAM +wmakeLnInclude -u OSspecific/${WM_OSTYPE:-POSIX} Pstream/Allwmake $targetType $* OSspecific/${WM_OSTYPE:-POSIX}/Allwmake $targetType $* @@ -38,7 +38,7 @@ wmake $targetType edgeMesh parallel/decompose/AllwmakeLnInclude dummyThirdParty/Allwmake $targetType $* -wmakeLnInclude fvOptions +wmakeLnInclude -u fvOptions wmake $targetType finiteVolume wmake $targetType lagrangian/basic diff --git a/src/Pstream/mpi/Make/options b/src/Pstream/mpi/Make/options index 74b6659671..43a48312c4 100644 --- a/src/Pstream/mpi/Make/options +++ b/src/Pstream/mpi/Make/options @@ -1,5 +1,5 @@ sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB) sinclude $(RULES)/mplib$(WM_MPLIB) -EXE_INC = $(PFLAGS) $(PINC) +EXE_INC = $(PFLAGS) $(PINC) $(c++LESSWARN) LIB_LIBS = $(PLIBS) diff --git a/src/TurbulenceModels/Allwmake b/src/TurbulenceModels/Allwmake index ddd0bb1ca5..dfe590d2a4 100755 --- a/src/TurbulenceModels/Allwmake +++ b/src/TurbulenceModels/Allwmake @@ -8,7 +8,7 @@ wmake $targetType turbulenceModels wmake $targetType incompressible wmake $targetType compressible wmake $targetType schemes -wmakeLnInclude phaseIncompressible -wmakeLnInclude phaseCompressible +wmakeLnInclude -u phaseIncompressible +wmakeLnInclude -u phaseCompressible #------------------------------------------------------------------------------ diff --git a/src/conversion/Allwmake b/src/conversion/Allwmake index 5686033253..664d800a63 100755 --- a/src/conversion/Allwmake +++ b/src/conversion/Allwmake @@ -2,15 +2,11 @@ cd ${0%/*} || exit 1 # Run from this directory # Parse arguments for library compilation +targetType=libso . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments - wmake $targetType -ccm/Allwmake || { - echo - echo "WARNING: skipped optional conversion component (build issues detected)" - echo -} +ccm/Allwmake #------------------------------------------------------------------------------ diff --git a/src/conversion/ccm/Allwmake b/src/conversion/ccm/Allwmake index da52586add..72914aaf4d 100755 --- a/src/conversion/ccm/Allwmake +++ b/src/conversion/ccm/Allwmake @@ -1,5 +1,4 @@ #!/bin/sh -# # Build optional components (eg, may depend on third-party libraries) #------------------------------------------------------------------------------ cd ${0%/*} || exit 1 # Run from this directory @@ -11,23 +10,27 @@ cd ${0%/*} || exit 1 # Run from this directory _foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ccmio) # Link with static libccmio only (possibly fewer issues) -if [ "$WM_LABEL_SIZE" = 64 ] + +warning="==> skip optional libccm adapter" + +if [ -e $CCMIO_ARCH_PATH/include/libccmio/ccmio.h \ + -a -e $CCMIO_ARCH_PATH/lib/libccmio.a ] then # The libccmio uses int32_t. # The OpenFOAM adapter thus requires additional work for 64-bit labels. - echo "Skipping optional 'libccm' adapter component" - echo " does not support 64-bit labels" -elif [ "$WM_PRECISION_OPTION" = SP ] -then # The OpenFOAM adapter was originally only designed for 'double' - echo "Skipping optional 'libccm' adapter component" - echo " was not originally designed for 'single precision' values" -elif [ -e $CCMIO_ARCH_PATH/include/libccmio/ccmio.h \ - -a -e $CCMIO_ARCH_PATH/lib/libccmio.a ] -then - wmake libso + + if [ "$WM_LABEL_SIZE" = 64 ] + then + echo "$warning (not designed for 64-bit labels)" + elif [ "$WM_PRECISION_OPTION" = SP ] + then + echo "$warning (not designed for single precision)" + else + wmake libso || echo "$warning (build issues detected)" + fi else - echo "Skipping optional component libccm" + echo $warning fi #------------------------------------------------------------------------------ diff --git a/src/functionObjects/graphics/runTimePostProcessing/Allwmake b/src/functionObjects/graphics/runTimePostProcessing/Allwmake index 9538323521..4b2ad8b107 100755 --- a/src/functionObjects/graphics/runTimePostProcessing/Allwmake +++ b/src/functionObjects/graphics/runTimePostProcessing/Allwmake @@ -8,12 +8,10 @@ cd ${0%/*} || exit 1 # Run from this directory [ -n "$WM_CC" ] && export CC="$WM_CC" [ -n "$WM_CXX" ] && export CXX="$WM_CXX" -echo echo "======================================================================" echo "${PWD##*/} : $PWD" echo - # CMake into objectsDir, # with an additional attempt if (possibly incorrect) CMakeCache.txt existed doCmake() @@ -64,6 +62,5 @@ else fi echo "======================================================================" -echo # ----------------------------------------------------------------------------- diff --git a/src/parallel/decompose/Allwmake b/src/parallel/decompose/Allwmake index c32e09fc7e..6bddc475ea 100755 --- a/src/parallel/decompose/Allwmake +++ b/src/parallel/decompose/Allwmake @@ -8,22 +8,18 @@ cd ${0%/*} || exit 1 # Run from this directory # - return 0 and export METIS_ARCH_PATH on success hasMetis() { - echo - echo "Metis decomposition" + local warning="==> skip metis" unset METIS_ARCH_PATH METIS_VERSION settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/metis) || { - echo - echo "Error: no config.sh/metis settings" - echo + echo "$warning (no config.sh/metis settings)" return 1 } . $settings if [ -z "$METIS_ARCH_PATH" -o "${METIS_ARCH_PATH##*-}" = none ] then - echo " skipping - no metis" - echo + echo "$warning (not available)" return 1 fi @@ -34,8 +30,7 @@ hasMetis() [ -f "$header" ] || header=/usr/include/metis.h fi [ -f "$header" ] || { - echo " skipping - no metis header" - echo + echo "$warning (no header)" return 2 # file not found } @@ -43,25 +38,23 @@ hasMetis() [ -r $FOAM_EXT_LIBBIN/libmetis.so ] || \ [ -r $METIS_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libmetis.so ] || \ [ "${METIS_ARCH_PATH##*-}" = system ] || { - echo " skipping - missing library" - echo + echo "$warning (missing library)" return 2 } # Ensure consistent sizes between OpenFOAM and metis header # Extract IDXTYPEWIDTH from metis.h: regex as per ThirdParty Allwmake local label=$(sed -ne 's/^.*#define *IDXTYPEWIDTH *\([1-9][0-9]\).*/\1/p' $header) - [ "$WM_LABEL_SIZE" = "$label" ] || { - echo " skipping - label=$WM_LABEL_SIZE, metis.h has '$label'" - echo - return 1 - } + : ${label:=unknown} - echo "using METIS_ARCH_PATH=$METIS_ARCH_PATH" - echo " label=$label" - echo - export METIS_ARCH_PATH - return 0 # success + if [ "$WM_LABEL_SIZE" = "$label" ] + then + echo "Metis (label=$label) - $METIS_ARCH_PATH" + export METIS_ARCH_PATH + else + echo "$warning (label=$WM_LABEL_SIZE, metis.h has '$label')" + return 1 + fi } @@ -69,22 +62,18 @@ hasMetis() # - return 0 and export SCOTCH_ARCH_PATH, SCOTCH_VERSION on success hasScotch() { - echo - echo "Scotch decomposition" + local warning="==> skip scotch" unset SCOTCH_ARCH_PATH SCOTCH_VERSION settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch) || { - echo - echo "Error: no config.sh/scotch settings" - echo + echo "$warning (no config.sh/scotch settings)" return 1 } . $settings if [ -z "$SCOTCH_ARCH_PATH" -o "${SCOTCH_ARCH_PATH##*-}" = none ] then - echo " skipping - no scotch" - echo + echo "$warning (not available)" return 1 fi @@ -95,8 +84,7 @@ hasScotch() [ -f "$header" ] || header=/usr/include/scotch.h fi [ -f "$header" ] || { - echo " skipping - no scotch header" - echo + echo "$warning (no header)" return 2 # file not found } @@ -104,8 +92,7 @@ hasScotch() [ -r $FOAM_EXT_LIBBIN/libscotch.so ] || \ [ -r $SCOTCH_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/libscotch.so ] || \ [ "${SCOTCH_ARCH_PATH##*-}" = system ] || { - echo " skipping - missing library" - echo + echo "$warning (missing library)" return 2 } @@ -116,18 +103,18 @@ hasScotch() "$header") : ${label:=unknown} - [ "$WM_LABEL_SIZE" = 32 -a \( "$label" = int32_t -o "$label" = int \) ] || \ - [ "$WM_LABEL_SIZE" = 64 -a \( "$label" = int64_t -o "$label" = long \) ] || { - echo " skipping - label='$WM_LABEL_SIZE', scotch.h has '$label'" - echo - return 1 - } - echo "using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH" - echo " label=$label ($WM_LABEL_SIZE)" - echo - export SCOTCH_ARCH_PATH SCOTCH_VERSION - return 0 # success + case "$WM_LABEL_SIZE:$label" in + (32:int32_t | 32:int | 64:int64_t | 64:long) + echo "Scotch (label=$label) - $SCOTCH_ARCH_PATH" + export SCOTCH_ARCH_PATH SCOTCH_VERSION + ;; + + *) + echo "$warning (label='$WM_LABEL_SIZE', scotch.h has '$label')" + return 1 + ;; + esac } @@ -156,7 +143,7 @@ wmakeMpiLib() done } -wmakeLnInclude decompositionMethods +wmakeLnInclude -u decompositionMethods if hasScotch then diff --git a/src/parallel/decompose/AllwmakeLnInclude b/src/parallel/decompose/AllwmakeLnInclude index 74fdde1f38..8aa65506c9 100755 --- a/src/parallel/decompose/AllwmakeLnInclude +++ b/src/parallel/decompose/AllwmakeLnInclude @@ -1,9 +1,9 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory -wmakeLnInclude decompositionMethods -wmakeLnInclude metisDecomp -wmakeLnInclude scotchDecomp -wmakeLnInclude ptscotchDecomp +wmakeLnInclude -u decompositionMethods +wmakeLnInclude -u metisDecomp +wmakeLnInclude -u scotchDecomp +wmakeLnInclude -u ptscotchDecomp #------------------------------------------------------------------------------ diff --git a/src/randomProcesses/Allwmake b/src/randomProcesses/Allwmake index e1ce66ba6a..db8daca130 100755 --- a/src/randomProcesses/Allwmake +++ b/src/randomProcesses/Allwmake @@ -1,5 +1,5 @@ #!/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 @@ -8,11 +8,10 @@ targetType=libso if [ -f "$FFTW_ARCH_PATH/include/fftw3.h" ] || \ [ "${FFTW_ARCH_PATH##*-}" = system -a -f "/usr/include/fftw3.h" ] then + # If it fails, we want to know. wmake $targetType else - echo - echo "Skipping randomProcesses library (no FFTW)" - echo + echo "==> skip randomProcesses library (no FFTW)" fi #------------------------------------------------------------------------------ diff --git a/src/renumber/Allwmake b/src/renumber/Allwmake index b76410a6a7..e1fcc89e66 100755 --- a/src/renumber/Allwmake +++ b/src/renumber/Allwmake @@ -6,35 +6,31 @@ targetType=libso . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments ## Get ZOLTAN_ARCH_PATH -#if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/zoltan` +#if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/zoltan) #then # . $settings # echo "using ZOLTAN_ARCH_PATH=$ZOLTAN_ARCH_PATH" #else -# echo # echo "Error: no config.sh/zoltan settings" -# echo #fi wmake $targetType renumberMethods +warning="==> skip SloanRenumber" if [ -f "$BOOST_ARCH_PATH/include/boost/version.hpp" ] || \ [ "${BOOST_ARCH_PATH##*-}" = system -a -f /usr/include/boost/version.hpp ] then - wmake $targetType SloanRenumber + wmake $targetType SloanRenumber || echo "$warning (build issues detected)" else - echo - echo "Skipping SloanRenumber (no boost)" - echo + echo "$warning (no boost)" fi +warning="==> skip zoltanRenumber" if [ -d "$ZOLTAN_ARCH_PATH" ] then - wmake $targetType zoltanRenumber + wmake $targetType zoltanRenumber || echo "$warning (build issues detected)" else - echo - echo "Skipping zoltanRenumber" - echo + echo "$warning (no library)" fi #------------------------------------------------------------------------------ diff --git a/wmake/scripts/AllwmakeParseArguments b/wmake/scripts/AllwmakeParseArguments index aa8b2e45ed..dc6ef4a0bd 100644 --- a/wmake/scripts/AllwmakeParseArguments +++ b/wmake/scripts/AllwmakeParseArguments @@ -71,13 +71,24 @@ do # If called from wmake (to avoid recursion) fromWmake=true ;; + -k | -non-stop) + # Non-stop compilation, ignoring errors + export WM_CONTINUE_ON_ERROR=true + continue # Permanently remove arg + ;; -l | -log) optLog="log.${WM_OPTIONS:-Allwmake}" continue # Permanently remove arg ;; -log=*) optLog="${arg##*=}" - [ -n "$optLog" ] || optLog="log.${WM_OPTIONS:-Allwmake}" + if [ -d "$optLog" ] + then + optLog="${optLog%/}/log.${WM_OPTIONS:-Allwmake}" + elif [ -z "$optLog" ] + then + optLog="log.${WM_OPTIONS:-Allwmake}" + fi continue # Permanently remove arg ;; -q | -queue) @@ -104,15 +115,21 @@ then if [ -z "$optLog" ] then exec wmake -all $optQueue $* + exit $? # Unneeded, but just in case something went wrong else - echo "logging wmake -all output to '$optLog'" 1>&2 - exec wmake -all $optQueue $* 2>&1 | tee $optLog + echo "Logging wmake -all output to '$optLog'" 1>&2 + echo 1>&2 + exec wmake -all $optQueue $* 2>&1 | /usr/bin/tee $optLog + # Need to cleanup after the tee + rc=$? # Error code from tee (not wmake), but not entirely important + echo "Done logging to '$optLog'" 1>&2 + exit $rc fi fi #------------------------------------------------------------------------------ -# If WM_CONTINUE_ON_ERROR not set activate the shell option "stop on error" +# Activate the shell option "stop on error" unless WM_CONTINUE_ON_ERROR is set #------------------------------------------------------------------------------ if [ -z "${WM_CONTINUE_ON_ERROR}" ]