From 9c35ea85bbef39b3668d801fa54b2c6515a216b7 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@Germany>
Date: Tue, 10 Jun 2008 13:09:36 +0200
Subject: [PATCH] wmakeLnInclude : also remove broken links

---
 wmake/wmakeLnInclude | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/wmake/wmakeLnInclude b/wmake/wmakeLnInclude
index b05d5ade81c..03828520cf3 100755
--- a/wmake/wmakeLnInclude
+++ b/wmake/wmakeLnInclude
@@ -27,12 +27,13 @@
 #     wmakeLnInclude
 #
 # Description
-#     Link all the source files in the $1 directory into $1/lnInclude
+#     Link all the source files in the <dir> directory into <dir>/lnInclude
 #
 #     Usage: wmakeLnInclude [-f] <dir> [-lnOption]
 #
 #     The desired source files:
-#         *.C *.H *.h *.cxx
+#         *.C *.H *.h *.cpp *.cxx *.hpp *.hxx
+#
 #     Avoid
 #         *.c (C source)
 #         .#* (cvs recovered files)
@@ -100,6 +101,7 @@ fi
 
 if [ -d $incDir ]
 then
+   # could change force to remove lnInclude first
    if [ ! "$forceUpdate" ]
    then
       # echo $Script: include directory $incDir already exists, exiting.
@@ -129,4 +131,10 @@ find .. $findOpt \
  -a ! -name ".#*"     \
  -exec ln $lnOpt {} . \;
 
+
+#
+# remove any broken links
+#
+find -L . -type l -exec rm \{\} \;
+
 #------------------------------------------------------------------------------
-- 
GitLab