openfoam/modules/Allwmake
Mark Olesen 0b41521d98 CONFIG: avoid triggering dash expansion bug (fixes #1757)
- use long form to avoid dash 0.5.8 error (ubuntu bionic)

- consolidate the prefix handling into modules/Allwmake
2020-07-01 16:20:13 +02:00

36 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
targetType=libso
. "${WM_PROJECT_DIR:?}"/wmake/scripts/AllwmakeParseArguments
#------------------------------------------------------------------------------
# Default build into OpenFOAM project locations unless specified with
# -prefix or FOAM_MODULE_PREFIX env varable
# Long form to avoid dash 0.5.8 error (issue #1757)
[ -n "$FOAM_MODULE_PREFIX" ] || FOAM_MODULE_PREFIX="${FOAM_LIBBIN%/*}"
export FOAM_MODULE_PREFIX
echo "========================================"
echo "Compile OpenFOAM modules"
echo "prefix = $FOAM_MODULE_PREFIX"
echo
echo " ignoring possible compilation errors"
echo " make certain to check the output file"
echo
set +e
export WM_CONTINUE_ON_ERROR=true
#------------------------------------------------------------------------------
for moduleName in $(./list-modules)
do
if [ -d "$moduleName" ]
then
( cd "$moduleName" && wmake -all $targetType )
fi
done
#------------------------------------------------------------------------------