Microoptimise TN-LEXICAL-DEPTH
[sbcl.git] / tools-for-build / canonicalize-whitespace
index 5c64e69..0d39131 100755 (executable)
@@ -5,5 +5,13 @@
 # Convert tabs to spaces and delete trailing whitespace in files
 # which we can safely assume to be source files in appropriate languages.
 
+if ! expand -t 8 < $DEVNULL
+then
+    # If we're building with MSYS on Windows GNU expand is not available,
+    # and what we get is Microsoft Expand, which is something quite different,
+    # so bail out.
+    exit
+fi
+
 tools-for-build/whitespacely-canonical-filenames \
   | xargs tools-for-build/canonicalize-whitespace-1