diff --git a/src/parallel/decompose/metis/Allwmake b/src/parallel/decompose/metis/Allwmake index c52b1e52a0..b0579c5f78 100755 --- a/src/parallel/decompose/metis/Allwmake +++ b/src/parallel/decompose/metis/Allwmake @@ -9,7 +9,7 @@ if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/metis` then . $settings echo " using METIS_ARCH_PATH=$METIS_ARCH_PATH" - if [ -r $METIS_ARCH_PATH/lib/libmetis.so ] + if [ -r "$METIS_ARCH_PATH/lib/libmetis.so" ] then wmake $targetType fi diff --git a/src/parallel/decompose/parMetis/Allwclean b/src/parallel/decompose/parMetis/Allwclean index 9907fc0c20..12ac95e286 100755 --- a/src/parallel/decompose/parMetis/Allwclean +++ b/src/parallel/decompose/parMetis/Allwclean @@ -3,16 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/wmake/scripts/AllwmakeMpiLib -# Get PARMETIS_VERSION, PARMETIS_ARCH_PATH -if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/parMetis` -then - . $settings - echo " using PARMETIS_ARCH_PATH=$PARMETIS_ARCH_PATH" - wcleanMpiLib $PARMETIS_VERSION parMetisDecomp -else - echo - echo " Error: no config.sh/parMetis settings" - echo -fi +wcleanMpiLib #------------------------------------------------------------------------------ diff --git a/src/parallel/decompose/parMetis/Allwmake b/src/parallel/decompose/parMetis/Allwmake index f91c8f3fc0..a1e6327adf 100755 --- a/src/parallel/decompose/parMetis/Allwmake +++ b/src/parallel/decompose/parMetis/Allwmake @@ -11,9 +11,11 @@ if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/parMetis` then . $settings echo " using PARMETIS_ARCH_PATH=$PARMETIS_ARCH_PATH" - if [ -r $PARMETIS_ARCH_PATH/lib/libparmetis.so ] + if [ -r "$PARMETIS_ARCH_PATH/lib/libparmetis.so" ] then - wmakeMpiLib $PARMETIS_VERSION + wmakeMpiLib $PARMETIS_VERSION parMetis + else + echo " skipping parMetis" fi else echo diff --git a/src/parallel/decompose/ptscotch/Allwclean b/src/parallel/decompose/ptscotch/Allwclean index 5d200b56fc..12ac95e286 100755 --- a/src/parallel/decompose/ptscotch/Allwclean +++ b/src/parallel/decompose/ptscotch/Allwclean @@ -3,16 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/wmake/scripts/AllwmakeMpiLib -# Get SCOTCH_VERSION, SCOTCH_ARCH_PATH -if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch` -then - . $settings - echo " using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH" - wcleanMpiLib $SCOTCH_VERSION -else - echo - echo " Error: no config.sh/scotch settings" - echo -fi +wcleanMpiLib #------------------------------------------------------------------------------ diff --git a/src/parallel/decompose/ptscotch/Allwmake b/src/parallel/decompose/ptscotch/Allwmake index 62c937014f..4d316e4edb 100755 --- a/src/parallel/decompose/ptscotch/Allwmake +++ b/src/parallel/decompose/ptscotch/Allwmake @@ -15,7 +15,9 @@ then && [ -n "$WM_MPLIB" ] \ && [ -d "$FOAM_LIBBIN/$FOAM_MPI" ] then - wmakeMpiLib $SCOTCH_VERSION + wmakeMpiLib $SCOTCH_VERSION ptscotch + else + echo " skipping ptscotch" fi else echo diff --git a/src/parallel/decompose/zoltan/Allwclean b/src/parallel/decompose/zoltan/Allwclean index 42b1f13a00..12ac95e286 100755 --- a/src/parallel/decompose/zoltan/Allwclean +++ b/src/parallel/decompose/zoltan/Allwclean @@ -3,6 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/wmake/scripts/AllwmakeMpiLib -wcleanMpiLib 3.90 +wcleanMpiLib #------------------------------------------------------------------------------ diff --git a/src/parallel/decompose/zoltan/Allwmake b/src/parallel/decompose/zoltan/Allwmake index 951c5ff1a0..3b03cc3885 100755 --- a/src/parallel/decompose/zoltan/Allwmake +++ b/src/parallel/decompose/zoltan/Allwmake @@ -6,11 +6,11 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/wmake/scripts/AllwmakeMpiLib +# Get ZOLTAN_VERSION, ZOLTAN_ARCH_PATH if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config.sh/zoltan` then . $settings echo " using ZOLTAN_ARCH_PATH=$ZOLTAN_ARCH_PATH" - if [ -n "$ZOLTAN_ARCH_PATH" ] \ && [ -r "$ZOLTAN_ARCH_PATH/include/zoltan.h" ] \ && { \ @@ -18,7 +18,7 @@ then || [ -r "$ZOLTAN_ARCH_PATH/lib/libzoltan.a" ]; \ } then - wmakeMpiLib $ZOLTAN_VERSION + wmakeMpiLib $ZOLTAN_VERSION zoltan else echo " skipping zoltan" fi diff --git a/wmake/scripts/AllwmakeMpiLib b/wmake/scripts/AllwmakeMpiLib index 1352dcf7ba..30eea78ba6 100644 --- a/wmake/scripts/AllwmakeMpiLib +++ b/wmake/scripts/AllwmakeMpiLib @@ -44,9 +44,9 @@ wmakeMpiLib() WM_OPTIONS="$WM_OPTIONS$WM_MPLIB" whichmpi="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/src/parallel/decompose/$libName/using:$FOAM_MPI" whichtarget="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/src/parallel/decompose/$libName/using:$version" - [ -e "$whichmpi" -a -e "$whichtarget" ] || wclean $libName - echo "wmake $targetType $libName" - wmake $targetType $libName + [ -e "$whichmpi" -a -e "$whichtarget" ] || wclean -noLnInclude + echo "wmake $targetType" + wmake $targetType touch "$whichmpi" "$whichtarget" ) } @@ -56,13 +56,8 @@ wmakeMpiLib() wcleanMpiLib() { ( - version="$1" - libName="$2" - WM_OPTIONS="$WM_OPTIONS$WM_MPLIB" - whichmpi="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/src/parallel/decompose/$libName/using:$FOAM_MPI" - whichtarget="$WM_PROJECT_DIR/platforms/$WM_OPTIONS/src/parallel/decompose/$libName/using:$version" - wclean $libName + wclean ) } diff --git a/wmake/wclean b/wmake/wclean index 3c3d80df8d..8a3150de7f 100755 --- a/wmake/wclean +++ b/wmake/wclean @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | Website: https://openfoam.org -# \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -54,7 +54,8 @@ Usage: $Script [OPTION] [dir] options: -silent | -s Ignored - for compatibility with wmake - -help Print the usage + -noLnInclude Don't remove lnInclude directories + -help | -h Print the usage Clean up the wmake control directory Make/\$WM_OPTIONS and remove the lnInclude directories generated for libraries. @@ -77,15 +78,20 @@ USAGE # Parse arguments and options #------------------------------------------------------------------------------ +noLnInclude= while [ "$#" -gt 0 ] do case "$1" in - -h | -help) - usage && exit 0 - ;; -s | -silent) # Ignored - for compatibility with wmake shift ;; + -noLnInclude) + noLnInclude=true + shift + ;; + -h | -help) + usage && exit 0 + ;; -*) error "unknown option: '$*'" ;; @@ -274,7 +280,7 @@ fi # Remove the lnInclude directory if present #------------------------------------------------------------------------------ -if [ -d lnInclude ] +if [ "$noLnInclude" != true ] && [ -d lnInclude ] then rm -rf lnInclude 2>/dev/null fi