Allwmake 1.05 KB
Newer Older
1 2 3 4 5 6 7 8 9
#!/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

10 11
# Long form to avoid dash 0.5.8 error (issue #1757)
[ -n "$FOAM_MODULE_PREFIX" ] || FOAM_MODULE_PREFIX="${FOAM_LIBBIN%/*}"
12 13
export FOAM_MODULE_PREFIX

14 15 16 17 18 19 20 21 22 23 24 25
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

#------------------------------------------------------------------------------

26
for moduleName in $(./list-modules)
27 28 29 30 31 32 33 34 35
do
    if [ -d "$moduleName" ]
    then
        ( cd "$moduleName" && wmake -all $targetType )
    fi
done


#------------------------------------------------------------------------------