Commit 3a964c04 authored by Mark Olesen's avatar Mark Olesen Committed by Andrew Heather
Browse files

COMP: report locations of build tools (such as flex, m4 etc)

- can assist diagnosing when things have gone wrong
parent 17d159d7
......@@ -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.
......
......@@ -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 \
......
#----------------------------------*-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
#------------------------------------------------------------------------------
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment