mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
wmake: Improve messages from wclean, wrmdep and wmakeLnIncludeAll
This commit is contained in:
12
wmake/wclean
12
wmake/wclean
@ -123,7 +123,7 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Provide some feedback
|
# Provide some feedback
|
||||||
echo "$Script ${dir:-./}"
|
echo "$Script $targetType ${dir:-.}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -135,18 +135,16 @@ if [ "$targetType" = empty ]
|
|||||||
then
|
then
|
||||||
# First pass: clean up empty source code directories
|
# First pass: clean up empty source code directories
|
||||||
|
|
||||||
echo "Searching for empty directories..."
|
echo "Removing empty directories..."
|
||||||
|
|
||||||
# Get sub-directories avoiding particular directories
|
# Get sub-directories avoiding particular directories
|
||||||
for dir in $(find . -mindepth 1 -maxdepth 1 \
|
for dir in $(find . -mindepth 1 -maxdepth 1 \
|
||||||
-type d \( -name .git -prune -o -print \) )
|
-type d \( -name .git -prune -o -print \) )
|
||||||
do
|
do
|
||||||
echo "check dir: $dir"
|
echo " searching: $dir"
|
||||||
find $dir -depth -type d -empty -exec rmdir {} \; -print
|
find $dir -depth -type d -empty -exec rmdir {} \; -print
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Search for empty directories complete."
|
|
||||||
|
|
||||||
# Second pass: clean up object directories with WM_PROJECT_DIR that don't
|
# Second pass: clean up object directories with WM_PROJECT_DIR that don't
|
||||||
# have respective source code folders, along with the respective binaries
|
# have respective source code folders, along with the respective binaries
|
||||||
|
|
||||||
@ -157,7 +155,7 @@ then
|
|||||||
|
|
||||||
if [ -d $objectsDir ]
|
if [ -d $objectsDir ]
|
||||||
then
|
then
|
||||||
echo "Searching for deprecated object directories at: $objectsDir"
|
echo "Removing redundant object directories in $objectsDir"
|
||||||
|
|
||||||
find $objectsDir -name 'variables' -print | \
|
find $objectsDir -name 'variables' -print | \
|
||||||
while read variablesFile
|
while read variablesFile
|
||||||
@ -197,8 +195,6 @@ then
|
|||||||
rm -rvf $depFile 2>/dev/null
|
rm -rvf $depFile 2>/dev/null
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Search for deprecated object directories complete."
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -146,6 +146,7 @@ then
|
|||||||
|
|
||||||
# Synchronize the file system to ensure that all of the links exist
|
# Synchronize the file system to ensure that all of the links exist
|
||||||
# before compilation
|
# before compilation
|
||||||
|
echo " synchronizing file system to ensure that all of the links exist"
|
||||||
sync
|
sync
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
19
wmake/wrmdep
19
wmake/wrmdep
@ -163,15 +163,17 @@ oldFolders)
|
|||||||
# Default is the current directory
|
# Default is the current directory
|
||||||
[ "$#" -gt 0 ] || set -- .
|
[ "$#" -gt 0 ] || set -- .
|
||||||
|
|
||||||
|
echo "Removing dep files that refer to sources files that no longer exist..."
|
||||||
|
|
||||||
for checkDir
|
for checkDir
|
||||||
do
|
do
|
||||||
findObjectDir $checkDir
|
findObjectDir $checkDir
|
||||||
|
|
||||||
if [ -d $objectsDir ]
|
if [ -d $objectsDir ]
|
||||||
then
|
then
|
||||||
echo "Searching: $objectsDir"
|
echo " searching: $objectsDir"
|
||||||
else
|
else
|
||||||
echo "Skipping non-dir: $objectsDir"
|
echo " skipping non-dir: $objectsDir"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -192,20 +194,23 @@ oldFolders)
|
|||||||
|
|
||||||
updateMode)
|
updateMode)
|
||||||
|
|
||||||
[ "$PWD" = "$WM_PROJECT_DIR" ] \
|
if [ "$PWD" != "$WM_PROJECT_DIR" ]
|
||||||
|| usage "Not in the project top-level directory"
|
then
|
||||||
|
echo "Cannot 'update', not in the project top-level directory"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Purging all dep files that relate to files that no longer exist..."
|
echo "Removing dep files corresponding to source files that no longer exist..."
|
||||||
fileNameList=$(find -L src applications -name '*.[CHL]' -type l)
|
fileNameList=$(find -L src applications -name '*.[CHL]' -type l)
|
||||||
|
|
||||||
for filePathAndName in $fileNameList
|
for filePathAndName in $fileNameList
|
||||||
do
|
do
|
||||||
fileName=$(basename $filePathAndName)
|
fileName=$(basename $filePathAndName)
|
||||||
echo "Purging from 'src': $fileName"
|
echo " 'src': $fileName"
|
||||||
cd src
|
cd src
|
||||||
$Script -a $fileName
|
$Script -a $fileName
|
||||||
|
|
||||||
echo "Purging from 'applications': $fileName"
|
echo " 'applications': $fileName"
|
||||||
cd ../applications
|
cd ../applications
|
||||||
$Script -a $fileName
|
$Script -a $fileName
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user