Skip to content
Snippets Groups Projects
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
Branches
Tags
No related merge requests found
...@@ -11,7 +11,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_PROJECT_DIR" 2>/dev/null || { ...@@ -11,7 +11,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_PROJECT_DIR" 2>/dev/null || {
exit 1 exit 1
} }
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Preamble. Report compiler version # Preamble. Report compiler version
...@@ -19,9 +19,15 @@ case "$WM_COMPILER" in ...@@ -19,9 +19,15 @@ case "$WM_COMPILER" in
Gcc*) gcc --version 2>/dev/null | sed -ne '1p' ;; Gcc*) gcc --version 2>/dev/null | sed -ne '1p' ;;
Clang*) clang --version 2>/dev/null | sed -ne '1p' ;; Clang*) clang --version 2>/dev/null | sed -ne '1p' ;;
esac 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 "========================================" echo "========================================"
date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown" date "+%Y-%m-%d %H:%M:%S %z" 2>/dev/null || echo "date is unknown"
echo "Starting compile ${WM_PROJECT_DIR##*/} ${0##*/}" echo "Starting compile ${WM_PROJECT_DIR##*/} ${0##*/}"
...@@ -36,7 +42,7 @@ echo ...@@ -36,7 +42,7 @@ echo
# Compile ThirdParty libraries and applications # Compile ThirdParty libraries and applications
if [ -d "$WM_THIRD_PARTY_DIR" ] if [ -d "$WM_THIRD_PARTY_DIR" ]
then then
$WM_THIRD_PARTY_DIR/Allwmake "$WM_THIRD_PARTY_DIR/Allwmake"
else else
echo "No ThirdParty directory found - skipping" echo "No ThirdParty directory found - skipping"
fi fi
...@@ -57,7 +63,7 @@ then ...@@ -57,7 +63,7 @@ then
echo "========================================" echo "========================================"
echo "Compile OpenFOAM modules" echo "Compile OpenFOAM modules"
echo echo
(cd $WM_PROJECT_DIR/modules 2>/dev/null && wmake -all) (cd "$WM_PROJECT_DIR/modules" 2>/dev/null && wmake -all)
fi fi
# Count files in given directory. Ignore "Test-*" binaries. # Count files in given directory. Ignore "Test-*" binaries.
......
...@@ -241,7 +241,7 @@ reportExecutable() ...@@ -241,7 +241,7 @@ reportExecutable()
| sed -ne 's/flex \([0-9][0-9.]*\).*/\1/p') | sed -ne 's/flex \([0-9][0-9.]*\).*/\1/p')
;; ;;
wmake) wmake)
VERSION="$(wmake -show-api 2>/dev/null)" VERSION="$(wmake --version 2>/dev/null)"
;; ;;
*gcc* | *g++*) *gcc* | *g++*)
VERSION=$($APP_NAME -v 2>&1 \ 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
#------------------------------------------------------------------------------
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment