mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: limit foamEtcFile -show-api to querying the META-INFO/api-info
- simplifies code, covers most cases. Can use wmake -show-api or wmakeBuildInfo to query the make rules. STYLE: Allwmake script adjustments - use bin/foamEtcFile instead of relying on PATH. The make environment may not have the OpenFOAM bin/ in it. - simpler shell syntax
This commit is contained in:
25
Allwmake
25
Allwmake
@ -6,13 +6,14 @@ wmakeCheckPwd "$WM_PROJECT_DIR" 2>/dev/null || {
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
[ -d "$WM_PROJECT_DIR" -a -f "$WM_PROJECT_DIR/etc/bashrc" ] || {
|
||||
if [ -f "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments ]
|
||||
then . "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments || \
|
||||
echo "Argument parse error";
|
||||
else
|
||||
echo "Error (${0##*/}) : WM_PROJECT_DIR appears to be incorrect"
|
||||
echo " Check your OpenFOAM environment and installation"
|
||||
exit 1
|
||||
}
|
||||
|
||||
. "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Preamble. Report tools or at least the mpirun location
|
||||
@ -45,11 +46,11 @@ echo
|
||||
"${WM_DIR:-wmake}"/src/Allmake
|
||||
|
||||
# Compile ThirdParty libraries and applications
|
||||
if [ -d "$WM_THIRD_PARTY_DIR" ]
|
||||
if [ -d "$WM_THIRD_PARTY_DIR" ] && [ -x "$WM_THIRD_PARTY_DIR/Allwmake" ]
|
||||
then
|
||||
"$WM_THIRD_PARTY_DIR/Allwmake"
|
||||
"$WM_THIRD_PARTY_DIR"/Allwmake
|
||||
else
|
||||
echo "No ThirdParty directory found - skipping"
|
||||
echo "No ThirdParty directory, or missing Allwmake - skipping"
|
||||
fi
|
||||
|
||||
echo "========================================"
|
||||
@ -74,7 +75,7 @@ fi
|
||||
# Count files in given directory. Ignore "Test-*" binaries.
|
||||
_foamCountDirEntries()
|
||||
{
|
||||
(cd "$1" 2>/dev/null && find -mindepth 1 -maxdepth 1 -type f 2>/dev/null) |\
|
||||
(cd "$1" 2>/dev/null && find . -mindepth 1 -maxdepth 1 -type f 2>/dev/null) |\
|
||||
sed -e '\@/Test-@d' | wc -l
|
||||
}
|
||||
|
||||
@ -86,10 +87,10 @@ echo " ${WM_PROJECT_DIR##*/}"
|
||||
echo " $WM_COMPILER ${WM_COMPILER_TYPE:-system} compiler"
|
||||
echo " ${WM_OPTIONS}, with ${WM_MPLIB} ${FOAM_MPI}"
|
||||
echo
|
||||
echo " api = $(foamEtcFile -show-api 2>/dev/null)"
|
||||
echo " patch = $(foamEtcFile -show-patch 2>/dev/null)"
|
||||
echo " bin = $(_foamCountDirEntries $FOAM_APPBIN) entries"
|
||||
echo " lib = $(_foamCountDirEntries $FOAM_LIBBIN) entries"
|
||||
echo " api = $(bin/foamEtcFile -show-api 2>/dev/null)"
|
||||
echo " patch = $(bin/foamEtcFile -show-patch 2>/dev/null)"
|
||||
echo " bin = $(_foamCountDirEntries "$FOAM_APPBIN") entries"
|
||||
echo " lib = $(_foamCountDirEntries "$FOAM_LIBBIN") entries"
|
||||
echo
|
||||
echo "========================================"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user