Commit ea87014a authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺
Browse files

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.
parent e4465512
#!/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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment