[5cf295]: tools-for-build / whitespacely-canonical-filenames  Maximize  Restore  History

Download this file

46 lines (38 with data), 1.4 kB


# (a script to be run in the root directory of the distribution,
# probably as part of an enclosing do-something-with-whitespace script)
# Print to stdout the names of files whose whitespace we (SBCLers)
# try to keep canonical.

# 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 .asd'
# other candidates:
#   .sh: if ./make.sh is altered, Bad Things happen
#   ?


if [ -e $stamp_file ]; then
    find_opt="-newer $stamp_file"

# 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

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

touch $stamp_file

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks