summaryrefslogtreecommitdiff
path: root/gi
diff options
context:
space:
mode:
Diffstat (limited to 'gi')
-rwxr-xr-xgi49
1 files changed, 0 insertions, 49 deletions
diff --git a/gi b/gi
deleted file mode 100755
index 833cac1b..00000000
--- a/gi
+++ /dev/null
@@ -1,49 +0,0 @@
1#!/bin/bash
2
3rootname=$(cat /etc/debian_chroot 2>/dev/null)
4echo $PATH | grep '\.stack' >/dev/null && rootname="stack"
5BUILDB=
6for b in build/b/Presence/monitortty.o .stack-work/dist/x86_64-linux/Cabal-*/build/Presence/monitortty.o; do
7 if [ -f $b ]; then
8 BUILDB=$(dirname $(dirname $b))
9 break
10 fi
11done
12[ -z "$BUILDB" ] && { echo "Where is monitortty.o?"; exit 1; }
13
14warn="-freverse-errors -fwarn-unused-imports -Wmissing-signatures -fdefer-typed-holes"
15exts="-XOverloadedStrings -XRecordWildCards"
16defs="-DBENCODE_AESON -DTHREAD_DEBUG"
17hidden="crypto-random crypto-api crypto-numbers cryptohash prettyclass"
18[ "$rootname" == "stack" ] && hidden=""
19hide=""
20for h in $hidden;do
21 # too slow.
22 # ghc-pkg latest $h && hide="$hide -hide-package $h"
23 hide="$hide -hide-package $h"
24done
25
26if [ "$rootname" == "stretch" ]
27 then
28 echo "Building with cryptonite backport. (chroot = $rootname)"
29 defs="$defs -DCRYPTONITE_BACKPORT -icryptonite-backport"
30 warn="$BUILDB/cbits/cryptonite_salsa.o $BUILDB/cbits/cryptonite_xsalsa.o $warn"
31 fi
32
33root=${0%/*}
34cd "$root"
35
36me=${0##*/}
37me=${me%.*}
38set -x
39ghci -fobject-code \
40 $hide \
41 $exts \
42 $defs \
43 -hidir build/$me$rootname -odir build/$me$rootname \
44 -iPresence \
45 -iArchive \
46 -isrc \
47 $BUILDB/Presence/monitortty.o \
48 $warn \
49 "$@"