summaryrefslogtreecommitdiff
path: root/mkconfig.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mkconfig.sh')
-rwxr-xr-xmkconfig.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/mkconfig.sh b/mkconfig.sh
new file mode 100755
index 0000000..1abfa94
--- /dev/null
+++ b/mkconfig.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+HVINFO_LINUX=False
+HVINFO_FREEBSD=False
+
+VERSION=$(cat VERSION)
+
+OS=$(uname)
+case $OS in
+ Linux)
+ HVINFO_LINUX=True
+ ;;
+ FreeBSD)
+ HVINFO_FREEBSD=True
+ ;;
+ *)
+ echo "Operating system $OS is not supported"
+ exit 1
+esac
+
+gnatprep -D LINUX=$HVINFO_LINUX \
+ -D FREEBSD=$HVINFO_FREEBSD \
+ -D VERSION=\"$VERSION\" \
+ src/config.ads.in src/config.ads