X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=clean.sh;h=e56d79f3b42989ae3e3d0cc212b27f06b8423592;hb=HEAD;hp=c2bf8adc83ee026c87bd4c823e0d1675517fb649;hpb=a0a413499415738d23cc40baa44e9c404af54a94;p=sbcl.git diff --git a/clean.sh b/clean.sh index c2bf8ad..e56d79f 100755 --- 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. @@ -13,27 +14,25 @@ # 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 by 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.) +rm -rf obj/* output/* src/runtime/genesis/ + +# Ensure that we know GNUMAKE. +. ./find-gnumake.sh +find_gnumake # Ask some other directories to clean themselves up. original_pwd=`pwd` for d in tools-for-build; do - cd $d > /dev/null + cd ./$d > /dev/null # I hope the -s option is standard. At least GNU make and BSD make # support it. It silences make, since otherwise the output from # this script is just the operations done by these make's, which # is misleading when this script does lotso other operations too. # -- WHN - make -s clean - cd $original_pwd > /dev/null + $GNUMAKE -I ../src/runtime -s clean + cd "$original_pwd" > /dev/null done +( cd ./doc ; sh ./clean.sh ) # Within all directories, remove things which don't look like source # files. Some explanations: @@ -41,16 +40,14 @@ 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 # architecture-dependent or OS-dependent symlinks -# *.htm, *.html -# probably machine-generated translation of DocBook (*.sgml) files # core # probably a Unix core dump -- not part of the sources anyway -# *.o, *.lib, *.nm, a.out +# *.o, *.so, *.lib, *.nm, a.out # results of C-style linking, assembling, etc. # *.core, *.map # looks like SBCL SAVE-LISP-AND-DIE or GENESIS output, and @@ -62,45 +59,64 @@ done # .#*, *.orig, .*.orig, *.rej # rubbish left behind by CVS updates # *.htm, *.html -# The system doc sources are SGML, any HTML is +# 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 # from other Lisp systems which might be used as xc hosts) +# *.tmp, *.lisp-temp +# conventional names for temporary files autogenerated in +# building or testing # 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 '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 - -cd doc && sh ./clean.sh + -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