Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Mark Olesen
2020-09-03 12:04:45 +02:00
14 changed files with 57 additions and 50 deletions

View File

@ -173,13 +173,18 @@ findObjectDir()
# Default (local) build directory
if [ -z "$objectsDir" ]
then
relativeDir="$absdir"
appDir=.
[ -d Make ] || appDir=$(findTarget .) || exit 1 # Fatal
absdir=$(expandPath "$appDir"/.)
if [ -d "$absdir/Make" ]
then
objectsDir="${absdir}/Make/${WM_OPTIONS}"
else
relativeDir="$absdir"
appDir=.
[ -d Make ] || appDir=$(findTarget .) || exit 1 # Fatal
absdir=$(expandPath "$appDir"/.)
relativeDir="${relativeDir#${absdir}}"
objectsDir="${appDir}/Make/${WM_OPTIONS}${relativeDir}"
relativeDir="${relativeDir#${absdir}}"
objectsDir="${appDir}/Make/${WM_OPTIONS}${relativeDir}"
fi
fi
echo "$objectsDir"

View File

@ -313,16 +313,18 @@ fi
# Clean the 'Make' directory if present
#------------------------------------------------------------------------------
if [ -d "$MakeDir" ]
if [ -d "$MakeDir" ] && [ -n "$WM_OPTIONS" ]
then
objectsDir="$MakeDir/$WM_OPTIONS"
case "$PWD" in
("$WM_PROJECT_DIR"/*)
buildPath="$WM_PROJECT_DIR/build/${WM_OPTIONS}"
objectsDir=$buildPath$(echo $PWD | sed s%$WM_PROJECT_DIR%% )
;;
esac
rm -rf "$objectsDir" 2>/dev/null
# Remove in-source directory (if any)
rm -rf "$MakeDir/$WM_OPTIONS" 2>/dev/null
# Remove out-of-source directory (if applicable)
relativeDir="${PWD#${WM_PROJECT_DIR}/}"
if [ "$relativeDir" != "$PWD" ]
then
objectsDir="${WM_PROJECT_DIR}/build/${WM_OPTIONS}/${relativeDir}"
rm -rf "$objectsDir" 2>/dev/null
fi
fi
#------------------------------------------------------------------------------