summaryrefslogtreecommitdiff
path: root/validate
diff options
context:
space:
mode:
Diffstat (limited to 'validate')
-rwxr-xr-xvalidate50
1 files changed, 35 insertions, 15 deletions
diff --git a/validate b/validate
index 170bb2db25..95425d3770 100755
--- a/validate
+++ b/validate
@@ -1,21 +1,37 @@
#!/bin/sh
-# Flags:
-# --no-clean: don't make clean first, just carry on from
-# a previous interrupted validation run
-# --testsuite-only: don't build the compiler, just run
-# the test suite
-# --hpc: build stage2 with -fhpc, and see how much of the
-# 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.
-# 2008-07-01: 14% slower than the default.
-
set -e
+show_help () {
+ cat <<EOF
+Usage: $0 [FLAGS]...
+
+Validate GHC source tree against testsuite; see
+http://ghc.haskell.org/trac/ghc/wiki/TestingPatches for more
+information.
+
+Flags:
+ --no-clean don't make clean first, just carry on from
+ a previous interrupted validation run
+ --testsuite-only don't build the compiler, just run the test suite
+ --hpc build stage2 with -fhpc, and see how much of the
+ 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.
+ 2008-07-01: 14% slower than the default.
+ --help shows this usage help.
+
+ Set environment variable 'CPUS' to number of cores, to exploit
+ multiple cpu cores, e.g.
+
+ CPUS=8 ./validate
+
+EOF
+}
+
no_clean=0
testsuite_only=0
hpc=NO
@@ -42,8 +58,12 @@ do
--normal)
speed=NORMAL
;;
+ --help)
+ show_help
+ exit 0;;
*)
- echo "Bad argument: $1" >&2
+ echo "$0: unrecognized argument '$1'" >&2
+ echo "Try '$0 --help' for more information." >&2
exit 1;;
esac
shift