From 5ba68da75b46ab51f453403479001420500d51f1 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@Germany>
Date: Sat, 10 Jan 2009 08:25:31 +0100
Subject: [PATCH] wmake script cosmetics

---
 wmake/wmake             | 8 ++++----
 wmake/wmakeLnIncludeAll | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/wmake/wmake b/wmake/wmake
index 4e004991069..61307c11802 100755
--- a/wmake/wmake
+++ b/wmake/wmake
@@ -55,7 +55,7 @@ USAGE
     exit 1
 }
 
-# provide immediate help
+# provide immediate help, even if none of the environment is set
 if [ "$1" = "-h" -o "$1" = "-help" ]
 then
     usage
@@ -73,7 +73,7 @@ do
     }
 done
 
-# when compiling anything but a standalone exe,
+# when compiling anything but a standalone exe:
 # WM_PROJECT and WM_PROJECT_DIR must be set
 [ "$1" = exe -o \( "$WM_PROJECT" -a "$WM_PROJECT_DIR" \) ] || {
     echo "$Script error:" 1>&2
@@ -176,7 +176,7 @@ fi
 
 #------------------------------------------------------------------------------
 # Check the existance of the Make directory and files file
-# If both exist make the wmake derived files
+# If both exist, make the wmake derived files
 #------------------------------------------------------------------------------
 
 [ -d $MakeDir ] || {
@@ -238,7 +238,7 @@ fi
 #------------------------------------------------------------------------------
 
 cmd="$make -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/includeDeps $makeOption"
-#echo "cmd=$cmd"
+# echo "cmd=$cmd"
 exec $cmd
 
 #------------------------------------------------------------------------------
diff --git a/wmake/wmakeLnIncludeAll b/wmake/wmakeLnIncludeAll
index 1eb5544d08d..da803f288eb 100755
--- a/wmake/wmakeLnIncludeAll
+++ b/wmake/wmakeLnIncludeAll
@@ -58,7 +58,7 @@ do
 
     find $checkDir -depth -type d -name Make -print | while read dir
     do
-        dir=${dir%Make}
+        dir=${dir%/Make}    # trim /Make directory from the end
         if [ -d "$dir" ]
         then
             wmakeLnInclude -f $dir
-- 
GitLab