aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Leroy <xavierleroy@users.noreply.github.com>2018-08-29 12:08:40 +0200
committerGitHub <noreply@github.com>2018-08-29 12:08:40 +0200
commitefacde9d864fb885ea7a5cecc4e6ab46c15ede29 (patch)
tree19825e0c8cc5cf079914daaef57b2e314c6aff42
parent17f9d839df12511a7e327f2840855e70af5ede47 (diff)
parent57b9c642757f6458d4d61a4095b12ab0c0f71dc4 (diff)
downloadcompcert-kvx-efacde9d864fb885ea7a5cecc4e6ab46c15ede29.tar.gz
compcert-kvx-efacde9d864fb885ea7a5cecc4e6ab46c15ede29.zip
Merge pull request #251 from AbsInt/configure-error-behavior
Improve behavior of configure script in case of configuration errors
-rwxr-xr-xconfigure14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure b/configure
index 1c1a4c36..7394091f 100755
--- a/configure
+++ b/configure
@@ -29,6 +29,10 @@ responsefile="gnu"
ignore_coq_version=false
usage='Usage: ./configure [options] target
+For help on options and targets, do: ./configure -help
+'
+
+help='Usage: ./configure [options] target
Supported targets:
ppc-eabi (PowerPC, EABI with GNU/Unix tools)
@@ -86,6 +90,10 @@ Options:
-ignore-coq-version Accept to use experimental or unsupported versions of Coq
'
+#
+# Remove Leftover Makefile.config (if any) (GPR#244)
+#
+rm -f Makefile.config
#
# Parse Command-Line Arguments
@@ -115,6 +123,12 @@ while : ; do
ignore_coq_version=true;;
-install-coqdev|--install-coqdev|-install-coq-dev|--install-coq-dev)
install_coqdev=true;;
+ -help|--help)
+ echo "$help"; exit 0;;
+ -*)
+ echo "Error: unknown option '$1'." 1>&2
+ echo "$usage" 1>&2
+ exit 2;;
*)
if test -n "$target"; then echo "$usage" 1>&2; exit 2; fi
target="$1";;