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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/a91df48bcf1a06dde529812c44bbceaee7c1fb10

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

commit a91df48bcf1a06dde529812c44bbceaee7c1fb10
Author: Ian Lynagh <[email protected]>
Date:   Thu Apr 14 19:56:51 2011 +0100

    Make the boot script complain if mk/build.mk doesn't exist
    
    If we aren't validating and mk/build.mk doesn't exist then boot
    prints a warning, pointing at instructions for setting up mk/build.mk.

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

 boot     |   21 +++++++++++++++++++++
 validate |    2 +-
 2 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/boot b/boot
index ae57381..9d7eb38 100755
--- a/boot
+++ b/boot
@@ -5,8 +5,10 @@ use strict;
 use Cwd;
 
 my %required_tag;
+my $validate;
 
 $required_tag{"-"} = 1;
+$validate = 0;
 
 while ($#ARGV ne -1) {
     my $arg = shift @ARGV;
@@ -14,6 +16,9 @@ while ($#ARGV ne -1) {
     if ($arg =~ /^--required-tag=(.*)/) {
         $required_tag{$1} = 1;
     }
+    elsif ($arg =~ /^--validate$/) {
+        $validate = 1;
+    }
     else {
         die "Bad arg: $arg";
     }
@@ -70,3 +75,19 @@ foreach $dir (".", glob("libraries/*/")) {
     }
 }
 
+if ($validate eq 0 && ! -f "mk/build.mk") {
+    print <<EOF;
+
+WARNING: You don't have a mk/build.mk file.
+
+By default a standard GHC build will be done, which uses optimisation
+and builds the profiling libraries. This will take a long time, so may
+not be what you want if you are developing GHC or the libraries, rather
+than simply building it to use it.
+
+For information on creating a mk/build.mk file, please see:
+    http://hackage.haskell.org/trac/ghc/wiki/Building/Using#Buildconfiguration
+
+EOF
+}
+
diff --git a/validate b/validate
index 8d6e2c3..b1ae14f 100755
--- a/validate
+++ b/validate
@@ -73,7 +73,7 @@ if [ $no_clean -eq 0 ]; then
         INSTDIR=`cygpath -m "$INSTDIR"`
     fi
 
-    /usr/bin/perl -w boot --required-tag=dph
+    /usr/bin/perl -w boot --validate --required-tag=dph
     ./configure --prefix="$INSTDIR" $config_args
 fi
 



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

Reply via email to