diff --git a/Allwmake b/Allwmake index 240e7e2621..6136570be0 100755 --- a/Allwmake +++ b/Allwmake @@ -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 diff --git a/modules/Allwmake b/modules/Allwmake index 1a6ca94867..b6bf9301a5 100755 --- a/modules/Allwmake +++ b/modules/Allwmake @@ -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" ]