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
This commit is contained in:
Mark Olesen 2020-07-01 15:07:57 +02:00
parent 968ce0290d
commit 0b41521d98
2 changed files with 14 additions and 13 deletions

View File

@ -80,18 +80,6 @@ then
echo
elif [ -d "$WM_PROJECT_DIR/modules" ]
then
echo "========================================"
echo "Compile OpenFOAM modules"
echo " ignoring possible compilation errors"
echo " make certain to check the output file"
echo
set +e
export WM_CONTINUE_ON_ERROR=true
# Default build into OpenFOAM project locations
: "${FOAM_MODULE_PREFIX:=${FOAM_LIBBIN%/*}}"
export FOAM_MODULE_PREFIX
(cd "$WM_PROJECT_DIR/modules" 2>/dev/null && wmake -all)
fi

View File

@ -7,9 +7,22 @@ targetType=libso
# Default build into OpenFOAM project locations unless specified with
# -prefix or FOAM_MODULE_PREFIX env varable
: "${FOAM_MODULE_PREFIX:=${FOAM_LIBBIN%/*}}"
# 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" ]