X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tools-for-build%2Fwhitespacely-canonical-filenames;h=42935fe6b53416b7a81dc4ae27d594267339f45a;hb=026be5a30130cdb1bc4648fa7daea8e1180a6e46;hp=b8587958d5e3b30f30a10c473f0485fd43d740b9;hpb=1af3faa2b79125b774c2182cab841ed7ee555bed;p=sbcl.git diff --git a/tools-for-build/whitespacely-canonical-filenames b/tools-for-build/whitespacely-canonical-filenames index b858795..42935fe 100755 --- a/tools-for-build/whitespacely-canonical-filenames +++ b/tools-for-build/whitespacely-canonical-filenames @@ -9,11 +9,37 @@ # glob patterns for source files in languages for which the # canonicalization is safe (not affecting meaning, at least given the # conservative syntax used in SBCL sources) -source_extensions='.lisp .lisp-expr .c .h' +source_extensions='.lisp .lisp-expr .c .h .asd' # other candidates: -# .sh +# .sh: if ./make.sh is altered, Bad Things happen # ? -for source_extension in $source_extensions; do - find . -name '*'$source_extension -print +stamp_file=whitespace-stamp + +if [ -e $stamp_file ]; then + find_opt="-newer $stamp_file" +else + find_opt="" +fi + +# SunOS find does not support -path. Try to find a binary which does. +if [ -n "$GNUFIND" ]; then : +elif which gfind >/dev/null; then GNUFIND=gfind +elif which gnufind >/dev/null; then GNUFIND=gnufind +else GNUFIND=find; fi +if ! "$GNUFIND" /dev/null -path dummy 2>/dev/null; then + echo "Warning: $GNUFIND might not be GNU: use of -path fails." 1>&2 +fi + +for source_extension in $source_extensions; do + "$GNUFIND" . \( \ + -path contrib/asdf -o \ + -name _darcs -o \ + -name '{arch}' -o \ + -name CVS -o \ + -name .hg -o \ + -name .svn \) -type d -prune -o \ + $find_opt -name '*'$source_extension -print done + +touch $stamp_file