mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: report locations of build tools (such as flex, m4 etc)
- can assist diagnosing when things have gone wrong
This commit is contained in:
committed by
Andrew Heather
parent
17d159d76d
commit
3a964c04f3
16
Allwmake
16
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.
|
||||
|
||||
@ -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 \
|
||||
|
||||
41
wmake/scripts/list_tools
Normal file
41
wmake/scripts/list_tools
Normal file
@ -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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user