Fix make-array transforms.
[sbcl.git] / clean.sh
index 0868e80..e56d79f 100755 (executable)
--- a/clean.sh
+++ b/clean.sh
@@ -1,4 +1,5 @@
 #!/bin/sh
+set -e
 
 # Remove everything in directories which are only used for output.
 # In most cases, we can remove the directories, too.
@@ -29,7 +30,7 @@ for d in tools-for-build; do
     # is misleading when this script does lotso other operations too.
     # -- WHN
     $GNUMAKE -I ../src/runtime -s clean
-    cd $original_pwd > /dev/null
+    cd "$original_pwd" > /dev/null
 done
 ( cd ./doc ; sh ./clean.sh )
 
@@ -39,7 +40,7 @@ done
 #     are never in the sources, so must've been created
 #   sbcl
 #     the runtime environment, created by compiling C code
-#   sbcl.h 
+#   sbcl.h
 #     information about Lisp code needed to build the runtime environment,
 #     created by running GENESIS
 #   Config, target
@@ -58,10 +59,10 @@ done
 #   .#*, *.orig, .*.orig, *.rej
 #     rubbish left behind by CVS updates
 #   *.htm, *.html
-#     The system doc sources are mostly texinfo, plus various odds 
+#     The system doc sources are mostly texinfo, plus various odds
 #     and ends like docstrings embedded in .lisp sources; any HTML is
 #     automatically-generated output.
-#   depend
+#   depend, *.d
 #     made by "make depend" (or "gmake depend" or some such thing)
 #   *.lisp-obj, *.fasl, *.x86f, *.axpf, *.lbytef, *.lib
 #     typical extensions for fasl files (not just from SBCL, but
@@ -72,34 +73,50 @@ done
 #   test-passed
 #     generated by automatic directory-test-thyself procedure
 find . \( \
-       -type l -o \
-       -name '*~' -o \
-       -name '#*#' -o \
-       -name '.#*' -o \
-       -name '*.orig' -o \
-       -name '.*.orig' -o \
+        -name _darcs -o \
+        -name '{arch}' -o \
+        -name CVS -o \
+        -name .hg -o \
+        -name .git -o \
+        -name .svn \) -type d -prune -o \
+       \( \
+        -type l -o \
+        -name '*~' -o \
+        -name '#*#' -o \
+        -name '.#*' -o \
+        -name '*.orig' -o \
+        -name '.*.orig' -o \
         -name '*.rej' -o \
-       -name '?*.x86f' -o \
-       -name '?*.axpf' -o \
-       -name '?*.lbytef' -o \
-       -name '?*.fasl' -o \
-       -name 'core' -o \
-       -name '?*.core' -o \
-       -name '*.map' -o \
-       -name '*.nm' -o \
-       -name '*.host-obj' -o \
-       -name '*.lisp-obj' -o \
-       -name '*.target-obj' -o \
-       -name '*.lib' -o \
-       -name '*.tmp' -o \
-       -name '*.lisp-temp' -o \
-       -name '*.o' -o \
-       -name '*.so' -o \
-       -name 'a.out' -o \
-       -name 'sbcl' -o \
-       -name 'sbcl.h' -o \
-       -name 'depend' -o \
-       -name 'TAGS' -o \
-       -name 'tags' -o \
-       -name 'test-passed' -o \
-       -name 'local-target-features.lisp-expr' \) -print | xargs rm -f
+        -name '?*.x86f' -o \
+        -name '?*.axpf' -o \
+        -name '?*.lbytef' -o \
+        -name '?*.fasl' -o \
+        -name '?*.FASL' -o \
+        -name 'core' -o \
+        -name '?*.core' -o \
+        -name '*.map' -o \
+        -name '*.nm' -o \
+        -name '*.host-obj' -o \
+        -name '*.lisp-obj' -o \
+        -name '*.target-obj' -o \
+        -name '*.lib' -o \
+        -name '*.tmp' -o \
+        -name '*.lisp-temp' -o \
+        -name '*.o' -o \
+        -name '*.so' -o \
+        -name '*.d' -o \
+        -name 'foo.c' -o \
+        -name 'test-output' -o \
+        -name 'test-lab' -o \
+        -name 'encodings.texi-temp' -o \
+        -name 'stack-alignment-offset' -o \
+        -name 'test-status.lisp-expr' -o \
+        -name 'a.out' -o \
+        -name 'sbcl' -o \
+        -name 'sbcl.h' -o \
+        -name 'depend' -o \
+        -name 'TAGS' -o \
+        -name 'tags' -o \
+        -name 'test-passed' -o \
+        -name 'ldso-stubs.S' -o \
+        -name 'local-target-features.lisp-expr' \) -print | xargs rm -fr