CONFIG: add top-level Allwmake-modules, Allwmake-plugins scripts

This commit is contained in:
Mark Olesen 2024-06-19 14:57:35 +02:00
parent fa49ae252b
commit cdc1a34bab
3 changed files with 90 additions and 1 deletions

View File

@ -68,19 +68,34 @@ src/Allwmake $targetType $*
# OpenFOAM applications
applications/Allwmake $targetType $*
#------------------------------------------------------------------------------
# Additional components
# Additional components/modules
case "$FOAM_MODULE_PREFIX" in
(false | none)
echo ========================================
echo "OpenFOAM modules disabled (prefix=${FOAM_MODULE_PREFIX})"
echo "Can be built separately:"
echo
echo " ./Allwmake-modules -prefix=..."
echo
echo ========================================
echo
;;
(*)
# Use wmake -all instead of Allwmake to allow for overrides
( cd "$WM_PROJECT_DIR/modules" 2>/dev/null && wmake -all )
echo ========================================
echo "The optional plugins can be built separately:"
echo
echo " ./Allwmake-plugins -prefix=..."
echo
echo ========================================
echo
esac
#------------------------------------------------------------------------------
# Count files in given directory. Ignore "Test-*" binaries.
_foamCountDirEntries()
{

37
Allwmake-modules Executable file
View File

@ -0,0 +1,37 @@
#!/bin/sh
# Run from OPENFOAM top-level directory only
cd "${0%/*}" || exit
wmake -check-dir "$WM_PROJECT_DIR" 2>/dev/null || {
echo "Error (${0##*/}) : not located in \$WM_PROJECT_DIR"
echo " Check your OpenFOAM environment and installation"
exit 1
}
if [ -f "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments ]
then . "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments -no-recursion "$@" || \
echo "Argument parse error"
else
echo "Error (${0##*/}) : WM_PROJECT_DIR appears to be incorrect"
echo " Check your OpenFOAM environment and installation"
exit 1
fi
#------------------------------------------------------------------------------
# Additional components
case "$FOAM_MODULE_PREFIX" in
(false | none)
echo ========================================
echo "OpenFOAM modules disabled (prefix=${FOAM_MODULE_PREFIX})"
echo "Can be built separately:"
echo
echo " ./Allwmake-modules -prefix=..."
echo
echo ========================================
echo
;;
(*)
# Use wmake -all instead of Allwmake to allow for overrides
( cd "$WM_PROJECT_DIR/modules" 2>/dev/null && wmake -all )
esac
#------------------------------------------------------------------------------

37
Allwmake-plugins Executable file
View File

@ -0,0 +1,37 @@
#!/bin/sh
# Run from OPENFOAM top-level directory only
cd "${0%/*}" || exit
wmake -check-dir "$WM_PROJECT_DIR" 2>/dev/null || {
echo "Error (${0##*/}) : not located in \$WM_PROJECT_DIR"
echo " Check your OpenFOAM environment and installation"
exit 1
}
if [ -f "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments ]
then . "$WM_PROJECT_DIR"/wmake/scripts/AllwmakeParseArguments -no-recursion "$@" || \
echo "Argument parse error"
else
echo "Error (${0##*/}) : WM_PROJECT_DIR appears to be incorrect"
echo " Check your OpenFOAM environment and installation"
exit 1
fi
#------------------------------------------------------------------------------
# Additional components
case "$FOAM_MODULE_PREFIX" in
(false | none)
echo ========================================
echo "OpenFOAM plugins disabled (prefix=${FOAM_MODULE_PREFIX})"
echo "Can be built separately:"
echo
echo " ./Allwmake-plugins -prefix=..."
echo
echo ========================================
echo
;;
(*)
# Use wmake -all instead of Allwmake to allow for overrides
( cd "$WM_PROJECT_DIR/plugins" 2>/dev/null && wmake -all )
esac
#------------------------------------------------------------------------------