Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/2555743c2b9d7408e8cf6f0fd1064651b37db08e

>---------------------------------------------------------------

commit 2555743c2b9d7408e8cf6f0fd1064651b37db08e
Author: Ian Lynagh <[email protected]>
Date:   Thu Apr 14 22:45:02 2011 +0100

    Check for ^M in packages file when booting
    
    If we find one then we print an error message and fail.

>---------------------------------------------------------------

 boot |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/boot b/boot
index 9d7eb38..66bff3e 100755
--- a/boot
+++ b/boot
@@ -24,6 +24,24 @@ while ($#ARGV ne -1) {
     }
 }
 
+{
+    local $/ = undef;
+    open FILE, "packages" or die "Couldn't open file: $!";
+    binmode FILE;
+    my $string = <FILE>;
+    close FILE;
+
+    if ($string =~ /\r/) {
+        print STDERR <<EOF;
+Found ^M in packages.
+Perhaps you need to run
+    git config --global core.autocrlf false
+and re-check out the tree?
+EOF
+        exit 1;
+    }
+}
+
 # Create libraries/*/{ghc.mk,GNUmakefile}
 system("/usr/bin/perl", "-w", "boot-pkgs") == 0
     or die "Running boot-pkgs failed: $?";



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to