4 # Remove everything in directories which are only used for output.
5 # In most cases, we can remove the directories, too.
7 # Preserving the skeletons of some directories might or might not not be relevant.
8 rm -rf obj
/* src
/runtime
/genesis
/ src
/runtime
/sbcl.mk src
/runtime
/*.dSYM
10 if [ -z "$SBCL_LEAVE_OUTPUT" ]
16 if [ $f != output
/ucd
]; then
22 # Ensure that we know GNUMAKE.
26 # Ask some other directories to clean themselves up.
28 for d
in tools-for-build
; do
30 # I hope the -s option is standard. At least GNU make and BSD make
31 # support it. It silences make, since otherwise the output from
32 # this script is just the operations done by these make's, which
33 # is misleading when this script does lots of other operations too.
35 $GNUMAKE -I ..
/src
/runtime
-s clean
36 cd "$original_pwd" > /dev
/null
38 ( cd .
/doc
&& sh .
/clean.sh
)
40 # Within all directories, remove things which don't look like source
41 # files. Some explanations:
43 # the runtime environment, created by compiling C code
45 # architecture-dependent or OS-dependent symlinks
47 # probably a Unix core dump -- not part of the sources anyway
48 # *.o, *.so, *.lib, *.nm, a.out
49 # results of C-style linking, assembling, etc.
51 # looks like SBCL SAVE-LISP-AND-DIE or GENESIS output, and
52 # certainly not source
54 # common names for editor temporary files
56 # files created by GNU etags and ctags
57 # .#*, *.orig, .*.orig, *.rej
58 # rubbish left behind by CVS updates
60 # The system doc sources are mostly texinfo, plus various odds
61 # and ends like docstrings embedded in .lisp sources; any HTML is
62 # automatically-generated output.
64 # made by "make depend" (or "gmake depend" or some such thing)
65 # *.lisp-obj, *.fasl, *.x86f, *.axpf, *.lbytef, *.lib
66 # typical extensions for fasl files (not just from SBCL, but
67 # from other Lisp systems which might be used as xc hosts)
69 # conventional names for temporary files autogenerated in
78 -name android-libs \
) -type d
-prune -o \
80 \
( -type l
-path .
/src
/runtime
/\
* \
) -o \
89 -name '?*.lbytef' -o \
95 -name '*.host-obj' -o \
96 -name '*.lisp-obj' -o \
97 -name '*.target-obj' -o \
100 -name '*.lisp-temp' -o \
105 -name 'test-lab' -o \
106 -name 'encodings.texi-temp' -o \
107 -name 'stack-alignment-offset' -o \
108 -name 'test-status.lisp-expr' -o \
109 -name 'last-random-state.lisp-expr' -o \
110 -name 'test.log' -o \
113 -name 'ppc-linux-mcontext.h' -o \
117 -name 'local-target-features.lisp-expr' \
) -print |
xargs rm -fr