summaryrefslogtreecommitdiff
path: root/standalone
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-12-05 20:40:28 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-12-05 20:40:28 -0400
commit6ff7f51d6e8a0039b9de28634474bc15b7e40e87 (patch)
tree4c1c8f56724997563e7a43ce9719ca3673b78d1b /standalone
parent8f65283d969b2077bae0c22a67364a297168589d (diff)
windows build foo
Diffstat (limited to 'standalone')
-rw-r--r--standalone/windows/build-simple.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/standalone/windows/build-simple.sh b/standalone/windows/build-simple.sh
new file mode 100644
index 000000000..93dfa2952
--- /dev/null
+++ b/standalone/windows/build-simple.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+# Script to build git-annex on windows. Run by build.bat
+
+set -e
+
+# Path to the Haskell Platform.
+HP="/c/Program Files (x86)/Haskell Platform/2012.4.0.0"
+
+PATH="$HP/bin:$HP/lib/extralibs/bin:/c/Program Files (x86)/NSIS:$PATH"
+
+# Run a command with the cygwin environment available.
+# However, programs not from cygwin are preferred.
+withcyg () {
+ PATH="$PATH:/c/cygwin/bin" "$@"
+}
+
+# Install haskell dependencies.
+# cabal install is not run in cygwin, because we don't want configure scripts
+# for haskell libraries to link them with the cygwin library.
+cabal install --only-dependencies || true
+
+# Build git-annex
+withcyg cabal configure
+withcyg cabal build || true
+
+# Works around link failure https://ghc.haskell.org/trac/ghc/ticket/8596
+# using a response file.
+rm -f build.log gcc.opt
+withcyg cabal build --ghc-options='-v -keep-tmp-files' > build.log 2>&1
+grep '"dist\\build\\git-annex\\git-annex.exe"' build.log | sed -e 's/^"[^"]*" //' -e 's/\\/\//g' > gcc.opt
+"$HP/mingw/bin/gcc.exe" @gcc.opt