Bug fix:
authorOrion Lawlor <olawlor@acm.org>
Mon, 2 Aug 2004 17:10:02 +0000 (17:10 +0000)
committerOrion Lawlor <olawlor@acm.org>
Mon, 2 Aug 2004 17:10:02 +0000 (17:10 +0000)
   Really blow away charm/bin, lib, include directories, even
if they're not just softlinks.  This lets ./build work properly
even if somebody does "cp -r" on the charm source tree--without
this change, the build would succeed, but charm/bin wouldn't change,
leading to horribly confusing errors.

build

diff --git a/build b/build
index a22391824bc467154cfea8d6d674ca75c874b462..7186c2d7be0ffe1cfc54a4fa9616afa0988360e2 100755 (executable)
--- a/build
+++ b/build
@@ -301,6 +301,8 @@ rm -f $VERSION/tmp/Makefile
 rm -f $VERSION/tmp/Make.depends
 rm -f $VERSION/tmp/Make.lb
 
+
+# Create the bin, lib, include, etc. links:
 if [ "x_`echo $VERSION | awk -F- '{print $2}'`" = "x_win32" ]
 then
 #Win32 version needs special compilers and *copied* (not linked)
@@ -316,15 +318,15 @@ else
 ln -f -s \$@
 EOF
   chmod +x $VERSION/tmp/system_ln
-       for newdir in `echo bin lib lib_so include tmp`
-       do
-               echo "Soft-linking over $newdir"
+  for newdir in `echo bin lib lib_so include tmp`
+  do
+    echo "Soft-linking over $newdir"
     if [ -r $newdir ]
     then
-      rm -f $newdir
+      rm -fr $newdir || exit 1
     fi
-               $VERSION/tmp/system_ln $VERSION/$newdir $newdir
-       done
+    $VERSION/tmp/system_ln $VERSION/$newdir $newdir
+  done
 fi
 
 $VERSION/tmp/system_ln "../../src/scripts/Make.depends" $VERSION/tmp/Make.depends