Ensure DynFlags are consistent
[ghc.git] / validate
index 6c33b06..ab1cc01 100755 (executable)
--- a/validate
+++ b/validate
@@ -18,18 +18,20 @@ Flags:
                     compiler the test suite covers.
                     2008-07-01: 63% slower than the default.
                     HTML generated here: testsuite/hpc_output/hpc_index.html
                     compiler the test suite covers.
                     2008-07-01: 63% slower than the default.
                     HTML generated here: testsuite/hpc_output/hpc_index.html
-  --normal          Default settings
   --fast            Omit dyn way, omit binary distribution
   --slow            Build stage2 with -DDEBUG. Skips tests that call
   --fast            Omit dyn way, omit binary distribution
   --slow            Build stage2 with -DDEBUG. Skips tests that call
-                    `compiler_stats_num_field`.
+                    compiler_stats_num_field.
                     2008-07-01: 14% slower than the default.
                     2008-07-01: 14% slower than the default.
-  --dph:            Also build libraries/dph and run associated tests.
+  --dph             Also build libraries/dph and run associated tests.
+  --quiet           More pretty build log.
+                    See Note [Default build system verbosity].
   --help            shows this usage help.
 
   --help            shows this usage help.
 
-  Set environment variable 'CPUS' to number of cores, to exploit
-  multiple cpu cores, e.g.
+  validate runs 'make -j\$THREADS', where by default THREADS is the number of
+  cpus your computer has +1. You can set the environment variable THREADS to
+  override this. For a sequential build you would for example use
 
 
-    CPUS=8 ./validate
+    THREADS=1 ./validate
 
 EOF
 }
 
 EOF
 }
@@ -59,7 +61,7 @@ do
     --fast)
         speed=FAST
         ;;
     --fast)
         speed=FAST
         ;;
-    --normal)
+    --normal) # for backward compat
         speed=NORMAL
         ;;
     --no-dph) # for backward compat
         speed=NORMAL
         ;;
     --no-dph) # for backward compat
@@ -120,8 +122,6 @@ detect_cpu_count () {
         # nothing helped
         CPUS="1"
     fi
         # nothing helped
         CPUS="1"
     fi
-
-    echo "using ${CPUS} CPUs" >&2
 }
 
 detect_cpu_count
 }
 
 detect_cpu_count
@@ -138,6 +138,8 @@ else
     threads="$THREADS"
 fi
 
     threads="$THREADS"
 fi
 
+echo "using THREADS=${threads}" >&2
+
 if type gmake > /dev/null 2> /dev/null
 then
     make="gmake"
 if type gmake > /dev/null 2> /dev/null
 then
     make="gmake"