aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorwinter Sparkles2026-08-24 00:44:14 +0100
committerwinter Sparkles2026-08-24 00:51:59 +0100
commit3bf3455924006c8ea81d5f269d5307f97490c267 (patch)
tree05fc2bf74ce539dca8d4624573834905695095b8 /configure
initial commit we have 'expand::home'
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure31
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