git-annex/standalone/windows/build-simple.sh

39 lines
1.2 KiB
Bash
Raw Normal View History

2013-12-06 00:40:28 +00:00
#!/bin/sh
# Script to build git-annex on windows. Run by build.bat
2013-12-06 01:02:27 +00:00
# Does not currently build the NSIS installer. See build.sh for how to do
# that.
2013-12-06 00:40:28 +00:00
set -e
2013-12-06 01:02:27 +00:00
set -x
2013-12-06 00:40:28 +00:00
# Path to the Haskell Platform.
2013-12-06 01:02:27 +00:00
HP="/c/Program Files/Haskell Platform/2013.2.0.0"
2013-12-06 00:40:28 +00:00
2013-12-06 01:02:27 +00:00
PATH="$HP/bin:$HP/lib/extralibs/bin:$PATH"
2013-12-06 00:40:28 +00:00
# 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.
2013-12-06 16:27:21 +00:00
ghc --make Build/EvilLinker
Build/EvilLinker
#withcyg rm -f build.log gcc.opt
#withcyg cabal build --ghc-options='-v -keep-tmp-files' > build.log 2>&1 || true
#withcyg grep 'dist\\build\\git-annex\\git-annex.exe' build.log | withcyg grep -v Linking | withcyg sed -e 's/^"[^"]*" //' -e 's/\\/\//g' > gcc.opt
#PATH="$HP/mingw/bin:$PATH"
#gcc @gcc.opt