From 1379e08a39ef9e199307e9b6608e7ad97ed03b77 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sun, 3 Apr 2016 10:30:43 +0100 Subject: [PATCH] Allwmake: Implement the default "stop on 1st error" Patch contributed by Bruno Santos Resolves tweak http://www.openfoam.org/mantisbt/view.php?id=2040 --- Allwmake | 6 +++--- AllwmakeLibccmio | 4 ++-- etc/tools/ThirdPartyFunctions | 20 +++++++++++++++----- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Allwmake b/Allwmake index 6c6d4eb3..2d345a89 100755 --- a/Allwmake +++ b/Allwmake @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -77,7 +77,7 @@ OPENMPI) set -x cd "${MPI_ARCH_PATH##*/}" || exit 1 # change to openmpi-VERSION - make distclean 2>/dev/null + [ -e Makefile ] && make distclean 2>/dev/null rm -rf $MPI_ARCH_PATH # start with GridEngine support, @@ -122,7 +122,7 @@ MPICH) set -x cd $MPI_HOME || exit 1 # change to mpich-VERSION - make distclean 2>/dev/null + [ -e Makefile ] && make distclean 2>/dev/null rm -rf $MPI_ARCH_PATH rm util/machines/machines.* diff --git a/AllwmakeLibccmio b/AllwmakeLibccmio index 293e09cc..87330ee6 100755 --- a/AllwmakeLibccmio +++ b/AllwmakeLibccmio @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -26,7 +26,7 @@ # AllwmakeLibccmio # # Description -# Get and build CD-adapco's ccmio library +# Build CD-adapco's ccmio library # #------------------------------------------------------------------------------ packageDir=libccmio-2.6.1 diff --git a/etc/tools/ThirdPartyFunctions b/etc/tools/ThirdPartyFunctions index 83cf34e6..85c03e90 100644 --- a/etc/tools/ThirdPartyFunctions +++ b/etc/tools/ThirdPartyFunctions @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -31,12 +31,13 @@ # Define WM_NCOMPPROCS always. #------------------------------------------------------------------------------ -# define the normal build and prefix directories +# Define the normal build and prefix directories buildBASE=$WM_THIRD_PARTY_DIR/build/$WM_ARCH$WM_COMPILER installBASE=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER + # -# mostly building without wmake +# Mostly building without wmake # - disable wmakeScheduler variables # - restrict WM_NCOMPPROCS to local number of cores # @@ -53,7 +54,16 @@ fi # -# download file $1 from url $2 into download/ directory +# If WM_CONTINUE_ON_ERROR not set activate the shell option "stop on error" +# +if [ -z "${WM_CONTINUE_ON_ERROR}" ] +then + set -e +fi + + +# +# Download file $1 from url $2 into download/ directory # downloadFile() { @@ -75,7 +85,7 @@ downloadFile() # -# copy Make/{files,options} from wmakeFiles/PACKAGE +# Copy Make/{files,options} from wmakeFiles/PACKAGE # # $1 = PACKAGE # $2 (optional) TARGET DIRECTORY