Skip to content

Commit

Permalink
wmake: Fix removal of lnInclude during build of mpi-dependent libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Bainbridge committed May 24, 2024
1 parent 0933bd1 commit 81dd264
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion wmake/scripts/AllwmakeMpiLib
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ 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
[ -e "$whichmpi" -a -e "$whichtarget" ] || wclean -noLnInclude $libName
echo "wmake $targetType $libName"
wmake $targetType $libName
touch "$whichmpi" "$whichtarget"
Expand Down
18 changes: 12 additions & 6 deletions wmake/wclean
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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: '$*'"
;;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 81dd264

Please sign in to comment.