Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Commit

Permalink
Use a lockfile to protect against concurrent GHC invocations (fixes #23)
Browse files Browse the repository at this point in the history
  • Loading branch information
jspahrsummers committed Aug 4, 2012
1 parent 84e00b7 commit 997e3bd
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions Configuration/compileHaskell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,16 @@ do
IMPORTS="$IMPORTS -i$DIR"
done

/usr/local/bin/ghc \
-XForeignFunctionInterface -XTemplateHaskell \
-Werror -fwarn-incomplete-patterns -fwarn-dodgy-imports -fwarn-dodgy-exports -fwarn-unused-binds -fwarn-hi-shadowing -fwarn-identities -fwarn-monomorphism-restriction \
-framework Foundation $IMPORTS \
-c -O -threaded --make \
"$@" \
"$INPUT_FILE_PATH"
lockfile -r 0 ghc.lock
if [ $? -eq 0 ]
then
/usr/local/bin/ghc \
-XForeignFunctionInterface -XTemplateHaskell \
-Werror -fwarn-incomplete-patterns -fwarn-dodgy-imports -fwarn-dodgy-exports -fwarn-unused-binds -fwarn-hi-shadowing -fwarn-identities -fwarn-monomorphism-restriction \
-framework Foundation $IMPORTS \
-c -O -threaded --make \
"$@" \
"$INPUT_FILE_PATH"

rm -f ghc.lock
fi

0 comments on commit 997e3bd

Please sign in to comment.