diff options
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/configure b/configure new file mode 100755 index 0000000..dd20e46 --- /dev/null +++ b/configure @@ -0,0 +1,31 @@ +#!/bin/sh +# behold my awful terrible fake configure script + +cd "$(dirname "$0")" || exit 1 + +# put in variables as given by long options +# e.g. --my-option=/usr becomes MY_OPTION=/usr +for arg in "$@"; do + without_dashes="${arg#--}" + name="${without_dashes%%=*}" + name="${name//-/_}" + value="${without_dashes#*=}" + echo "${name^^}:=${value}" +done > config.mk + +# and here are some defaults in case nobody bothered to pass options +cat >>config.mk <<'EOF' +HARE ?= hare +DESTDIR ?= +PREFIX ?= /usr/local +SRCDIR ?= $(PREFIX)/src +HARESRCDIR ?= $(SRCDIR)/hare +THIRDPARTYDIR ?= $(HARESRCDIR)/third-party +EOF + +# TODO: parse --host/--target/--build into appropriate hare architecture ? + +# i feel like i need to say something on completion, because this script is so +# much faster and quieter than real autoconf configure, you might think it +# didn't do anything otherwise +echo 'configure: done' 1>&2 |
