diff --git a/Allwmake b/Allwmake index c4544892a4fe7fcbcd63c7146297d2cb79893b47..c52325162535dc7dff7ab2236df57d76bb536460 100755 --- a/Allwmake +++ b/Allwmake @@ -11,7 +11,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_PROJECT_DIR" 2>/dev/null || { exit 1 } -. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments +. "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments #------------------------------------------------------------------------------ # Preamble. Report compiler version @@ -19,9 +19,15 @@ case "$WM_COMPILER" in Gcc*) gcc --version 2>/dev/null | sed -ne '1p' ;; Clang*) clang --version 2>/dev/null | sed -ne '1p' ;; esac -# Preamble. Report mpirun location -command -v mpirun 2>/dev/null || true +# Preamble. Report tools or at least the mpirun location +if [ -f "$WM_PROJECT_DIR"/wmake/scripts/list_tools ] +then . "$WM_PROJECT_DIR"/wmake/scripts/list_tools ] +else + echo "mpirun=$(command -v mpirun || true)" +fi + +echo echo "========================================" date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown" echo "Starting compile ${WM_PROJECT_DIR##*/} ${0##*/}" @@ -36,7 +42,7 @@ echo # Compile ThirdParty libraries and applications if [ -d "$WM_THIRD_PARTY_DIR" ] then - $WM_THIRD_PARTY_DIR/Allwmake + "$WM_THIRD_PARTY_DIR/Allwmake" else echo "No ThirdParty directory found - skipping" fi @@ -57,7 +63,7 @@ then echo "========================================" echo "Compile OpenFOAM modules" echo - (cd $WM_PROJECT_DIR/modules 2>/dev/null && wmake -all) + (cd "$WM_PROJECT_DIR/modules" 2>/dev/null && wmake -all) fi # Count files in given directory. Ignore "Test-*" binaries. diff --git a/bin/foamInstallationTest b/bin/foamInstallationTest index 326705c6d02f4db7de6b0bbe9c328f3dd14e1a86..de9659c7a2a844448db631d66d46adf54692ce8d 100755 --- a/bin/foamInstallationTest +++ b/bin/foamInstallationTest @@ -241,7 +241,7 @@ reportExecutable() | sed -ne 's/flex \([0-9][0-9.]*\).*/\1/p') ;; wmake) - VERSION="$(wmake -show-api 2>/dev/null)" + VERSION="$(wmake --version 2>/dev/null)" ;; *gcc* | *g++*) VERSION=$($APP_NAME -v 2>&1 \ diff --git a/wmake/scripts/list_tools b/wmake/scripts/list_tools new file mode 100644 index 0000000000000000000000000000000000000000..2184bc7e33a2e607de55ccf96bd7734699d60b8f --- /dev/null +++ b/wmake/scripts/list_tools @@ -0,0 +1,41 @@ +#----------------------------------*-sh-*-------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | www.openfoam.com +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# Copyright (C) 2019 OpenCFD Ltd. +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM, licensed under GNU General Public License +# <http://www.gnu.org/licenses/>. +# +# Script +# list_tools +# +# Description +# List names and paths of some common build-related tools +# +# Note +# Uses 'true' on all commands to avoid triggering an exit-on-error +# issue when sourced +# +#------------------------------------------------------------------------------ + +echo "gcc=$(command -v gcc || true)" +echo "clang=$(command -v clang || true)" +echo "mpirun=$(command -v mpirun || true)" +echo "make=$(command -v make || true)" +echo "cmake=$(command -v cmake || true)" +echo "wmake=$(command -v wmake || true)" +echo "m4=$(command -v m4 || true)" +## echo "awk=$(command -v awk || true)" +## echo "sed=$(command -v sed || true)" +echo "flex=$(command -v flex || true)" +## echo "bison=$(command -v bison || true)" +## echo "ragel=$(command -v ragel || true)" + +true # clean exit + +#------------------------------------------------------------------------------