From 7ffcf4d622e4f9608574033c328cba1f7f7c9ca5 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Sun, 5 Apr 2015 22:26:57 +0600 Subject: Build scripts revamp. --- mkconfig.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 mkconfig.sh (limited to 'mkconfig.sh') 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 -- cgit v1.2.3