diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2013-08-31 16:42:06 +0200 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2013-08-31 16:42:06 +0200 |
commit | ea87014a7ad4454f18bb15f6f0ee4b6e61b148be (patch) | |
tree | 0d104469e1f74bd1b0101f51e12d0f968a18eb04 /validate | |
parent | e446551209c2466871e586956ef33a53c9e3b0d2 (diff) | |
download | haskell-ea87014a7ad4454f18bb15f6f0ee4b6e61b148be.tar.gz |
Teach `validate` script how to `--help`
This basically turns the comment at the beginning of the `validate`
shell script into an interactive `--help` output plus some minor additions.
Diffstat (limited to 'validate')
-rwxr-xr-x | validate | 50 |
1 files changed, 35 insertions, 15 deletions
@@ -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 |