do a clean build if incremental fails

This commit is contained in:
Joey Hess 2013-05-19 20:35:33 -04:00
parent b5433c3a9d
commit 0bc43407e5

View file

@ -35,14 +35,24 @@ cd ..
cabal install --only-dependencies -f"$FLAGS" cabal install --only-dependencies -f"$FLAGS"
# Build git-annex runbuild () {
withcyg cabal configure -f"$FLAGS" # Build git-annex
withcyg cabal build withcyg cabal configure -f"$FLAGS"
withcyg cabal build
# Build the installer
cabal install nsis
ghc --make Build/NullSoftInstaller.hs
withcyg Build/NullSoftInstaller.exe
}
# Build the installer # Incremental build sometimes may fail, possibly because the configure
cabal install nsis # script has changed but cabal neglects to re-build it on Windows
ghc --make Build/NullSoftInstaller.hs if ! runbuild; then
withcyg Build/NullSoftInstaller.exe echo "Retrying after cabal clean"
cabal clean
runbuild
fi
# Test git-annex # Test git-annex
rm -rf .t rm -rf .t