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 # The supposed explanation definitely no longer holds - there is no "src/c-runtime/sbcl.h"
9 # as a symlink into "output/". The sbcl.h file is a plain file, and it's been that way
10 # for quite some time.
11 rm -rf obj
/* output
/* src
/runtime
/genesis
/ src
/runtime
/sbcl.mk src
/runtime
/*.dSYM
13 # Ensure that we know GNUMAKE.
17 # Ask some other directories to clean themselves up.
19 for d
in tools-for-build
; do
21 # I hope the -s option is standard. At least GNU make and BSD make
22 # support it. It silences make, since otherwise the output from
23 # this script is just the operations done by these make's, which
24 # is misleading when this script does lots of other operations too.
26 $GNUMAKE -I ..
/src
/runtime
-s clean
27 cd "$original_pwd" > /dev
/null
29 ( cd .
/doc
&& sh .
/clean.sh
)
31 # Within all directories, remove things which don't look like source
32 # files. Some explanations:
34 # the runtime environment, created by compiling C code
36 # information about Lisp code needed to build the runtime environment,
37 # created by running GENESIS
39 # architecture-dependent or OS-dependent symlinks
41 # probably a Unix core dump -- not part of the sources anyway
42 # *.o, *.so, *.lib, *.nm, a.out
43 # results of C-style linking, assembling, etc.
45 # looks like SBCL SAVE-LISP-AND-DIE or GENESIS output, and
46 # certainly not source
48 # common names for editor temporary files
50 # files created by GNU etags and ctags
51 # .#*, *.orig, .*.orig, *.rej
52 # rubbish left behind by CVS updates
54 # The system doc sources are mostly texinfo, plus various odds
55 # and ends like docstrings embedded in .lisp sources; any HTML is
56 # automatically-generated output.
58 # made by "make depend" (or "gmake depend" or some such thing)
59 # *.lisp-obj, *.fasl, *.x86f, *.axpf, *.lbytef, *.lib
60 # typical extensions for fasl files (not just from SBCL, but
61 # from other Lisp systems which might be used as xc hosts)
63 # conventional names for temporary files autogenerated in
72 -name android-libs \
) -type d
-prune -o \
74 \
( -type l
-path .
/src
/runtime
/\
* \
) -o \
83 -name '?*.lbytef' -o \
89 -name '*.host-obj' -o \
90 -name '*.lisp-obj' -o \
91 -name '*.target-obj' -o \
94 -name '*.lisp-temp' -o \
100 -name 'encodings.texi-temp' -o \
101 -name 'stack-alignment-offset' -o \
102 -name 'test-status.lisp-expr' -o \
103 -name 'last-random-state.lisp-expr' -o \
104 -name 'test.log' -o \
105 -name 'whitespace-stamp' -o \
109 -name 'ppc-linux-mcontext.h' -o \
113 -name 'local-target-features.lisp-expr' \
) -print |
xargs rm -fr