Commit 0cfd1adb authored by Henry Weller's avatar Henry Weller
Browse files

wmake: Improve messages from wclean, wrmdep and wmakeLnIncludeAll

parent d16324bf
......@@ -123,7 +123,7 @@ then
fi
# Provide some feedback
echo "$Script ${dir:-./}"
echo "$Script $targetType ${dir:-.}"
fi
......@@ -135,18 +135,16 @@ if [ "$targetType" = empty ]
then
# First pass: clean up empty source code directories
echo "Searching for empty directories..."
echo "Removing empty directories..."
# Get sub-directories avoiding particular directories
for dir in $(find . -mindepth 1 -maxdepth 1 \
-type d \( -name .git -prune -o -print \) )
do
echo "check dir: $dir"
echo " searching: $dir"
find $dir -depth -type d -empty -exec rmdir {} \; -print
done
echo "Search for empty directories complete."
# Second pass: clean up object directories with WM_PROJECT_DIR that don't
# have respective source code folders, along with the respective binaries
......@@ -157,7 +155,7 @@ then
if [ -d $objectsDir ]
then
echo "Searching for deprecated object directories at: $objectsDir"
echo "Removing redundant object directories in $objectsDir"
find $objectsDir -name 'variables' -print | \
while read variablesFile
......@@ -197,8 +195,6 @@ then
rm -rvf $depFile 2>/dev/null
fi
done
echo "Search for deprecated object directories complete."
fi
fi
......
......@@ -146,6 +146,7 @@ then
# Synchronize the file system to ensure that all of the links exist
# before compilation
echo " synchronizing file system to ensure that all of the links exist"
sync
fi
......
......@@ -163,15 +163,17 @@ oldFolders)
# Default is the current directory
[ "$#" -gt 0 ] || set -- .
echo "Removing dep files that refer to sources files that no longer exist..."
for checkDir
do
findObjectDir $checkDir
if [ -d $objectsDir ]
then
echo "Searching: $objectsDir"
echo " searching: $objectsDir"
else
echo "Skipping non-dir: $objectsDir"
echo " skipping non-dir: $objectsDir"
continue
fi
......@@ -182,7 +184,7 @@ oldFolders)
# Check C++ or Flex source file exists
if [ ! -r "$sourceFile" ];
then
echo "rm $depFile"
echo " rm $depFile"
rm -f $depFile 2>/dev/null
fi
done
......@@ -192,20 +194,23 @@ oldFolders)
updateMode)
[ "$PWD" = "$WM_PROJECT_DIR" ] \
|| usage "Not in the project top-level directory"
if [ "$PWD" != "$WM_PROJECT_DIR" ]
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)
for filePathAndName in $fileNameList
do
fileName=$(basename $filePathAndName)
echo "Purging from 'src': $fileName"
echo " 'src': $fileName"
cd src
$Script -a $fileName
echo "Purging from 'applications': $fileName"
echo " 'applications': $fileName"
cd ../applications
$Script -a $fileName
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment