[697317]: clean.sh Maximize Restore History

Download this file

clean.sh    65 lines (62 with data), 2.4 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/sh
# Remove everything in directories which are only used for output.
# In most cases, we can remove the directories, too.
#
# (We don't remove all the directories themselves for a stupid technical
# reason: "gmake clean" in the src/runtime directory gets unhappy if the
# output/ directory doesn't exist, because it tries to build Depends
# before it cleans itself, and src/c-runtime/sbcl.h is a symlink into
# the output/ directory, and it gets the gcc dependency processing gets
# all confused trying to figure out a header file which is a symlink
# into a directory which doesn't exist. We'd like to be able to run
# this script (including "gmake clean" in the src/runtime directory)
# several times in a row without failure.. so we leave the output/
# directory in place.)
rm -rf obj/* output/* doc/user-manual/ \
doc/user-manual.junk/ doc/DBTOHTML_OUTPUT_DIR*
# (The doc/user-manual.junk/ and doc/DBTOHTML_OUTPUT_DIR* directories
# are created when the Cygnus db2html script when it formats the the
# user manual, and since this db2html script is the one which is
# currently used to format the manual for the standard binary
# distribution, we automatically clean up after it here in the
# standard clean.sh file.)
# Within other directories, remove things which don't look like source
# files. Some explanations:
# (symlinks)
# are never in the sources; they must've been created
# sbcl
# the runtime environment, created by compiling C code
# sbcl.h
# information about Lisp code needed to build the runtime environment,
# created by running GENESIS
# Config, target
# architecture-dependent or OS-dependent symlinks
# *.htm, *.html
# probably machine-generated translation of DocBook (*.sgml) files
# core
# probably a core dump -- not part of the sources anyway
# *~, #*#, TAGS
# common names for editor temporary files
find . \( \
-type l -or \
-name '*~' -or \
-name '#*#' -or \
-name '?*.x86f' -or \
-name '?*.lbytef' -or \
-name 'core' -or \
-name '?*.core' -or \
-name '*.map' -or \
-name '*.nm' -or \
-name '*.host-obj' -or \
-name '*.lisp-obj' -or \
-name '*.target-obj' -or \
-name '*.lib' -or \
-name '*.tmp' -or \
-name '*.o' -or \
-name 'sbcl' -or \
-name 'sbcl.h' -or \
-name 'depend' -or \
-name '*.htm' -or \
-name '*.html' -or \
-name 'TAGS' -or \
-name 'local-target-features.lisp-expr' \) -print | xargs rm -f