This script can be used to integrate the Haskell build into Xcode. Instructions for doing this are in GHC-iPhone.pdf --- ghc-6.10.2.orig/cabal-install/cabal-install/build-iphone-haskell.sh 1970-01-01 12:00:00.000000000 +1200 +++ ghc-6.10.2/cabal-install/cabal-install/build-iphone-haskell.sh 2009-06-18 15:54:37.000000000 +1200 @@ -0,0 +1,34 @@ +#!/bin/sh +echo "build-iphone-haskell.sh running with ACTION=$ACTION and PLATFORM_NAME=$PLATFORM_NAME" + +IPHONE_BIN="$(dirname $0)" +DIST="$TARGET_BUILD_DIR/dist" +export PATH="$IPHONE_BIN:$PATH" + +case "$PLATFORM_NAME" in + iphonesimulator) + CABAL=iphone-simulator-cabal + ;; + iphoneos) + CABAL=iphone-cabal + ;; + *) + echo "build-iphone-haskell.sh: No cabal version for platform '$PLATFORM_NAME'" + exit 1 + ;; +esac + +case "$ACTION" in + "") + mkdir -p "$DIST" || exit 1 + $CABAL --distpref="$DIST" configure || exit 1 + $CABAL --distpref="$DIST" build || exit 1 + ;; + clean) + $CABAL --distpref="$DIST" clean || exit 1 + ;; + *) + echo "build-iphone-haskell.sh: Unknown action '$1'" + exit 1 + ;; +esac