diff options
Diffstat (limited to 'gi')
-rwxr-xr-x | gi | 49 |
1 files changed, 0 insertions, 49 deletions
@@ -1,49 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | rootname=$(cat /etc/debian_chroot 2>/dev/null) | ||
4 | echo $PATH | grep '\.stack' >/dev/null && rootname="stack" | ||
5 | BUILDB= | ||
6 | for 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 | ||
11 | done | ||
12 | [ -z "$BUILDB" ] && { echo "Where is monitortty.o?"; exit 1; } | ||
13 | |||
14 | warn="-freverse-errors -fwarn-unused-imports -Wmissing-signatures -fdefer-typed-holes" | ||
15 | exts="-XOverloadedStrings -XRecordWildCards" | ||
16 | defs="-DBENCODE_AESON -DTHREAD_DEBUG" | ||
17 | hidden="crypto-random crypto-api crypto-numbers cryptohash prettyclass" | ||
18 | [ "$rootname" == "stack" ] && hidden="" | ||
19 | hide="" | ||
20 | for h in $hidden;do | ||
21 | # too slow. | ||
22 | # ghc-pkg latest $h && hide="$hide -hide-package $h" | ||
23 | hide="$hide -hide-package $h" | ||
24 | done | ||
25 | |||
26 | if [ "$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 | |||
33 | root=${0%/*} | ||
34 | cd "$root" | ||
35 | |||
36 | me=${0##*/} | ||
37 | me=${me%.*} | ||
38 | set -x | ||
39 | ghci -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 | "$@" | ||