[Haskell-study] [haskell-study] push by carl... at bactrian.org - makedepend can now take advantage of ghc -dep-makefile. on 2009-11-01 03:57 GMT
haskell-study at googlecode.com
haskell-study at googlecode.com
Sat Oct 31 22:58:39 CDT 2009
Revision: c8a82ce698
Author: "David Carlton <carlton at bactrian.org>"
Date: Sat Oct 31 20:57:45 2009
Log: makedepend can now take advantage of ghc -dep-makefile.
http://code.google.com/p/haskell-study/source/detail?r=c8a82ce698
Modified:
/carlton/makedepend
=======================================
--- /carlton/makedepend Sat Oct 31 16:56:29 2009
+++ /carlton/makedepend Sat Oct 31 20:57:45 2009
@@ -1,22 +1,12 @@
#!/bin/bash
-# Ubuntu (via Debian) still comes with GHC 6.8.2, even though there
-# are several later GHC versions. And that GHC version only has the
-# -M flag for dependency generation, which hand-edits your Makefile.
-# Which, of course, doesn't play so well with the idea that you
-# shouldn't check generated code into source code. Sigh.
-
-cleanup() {
- mv Makefile-saved Makefile
-}
-
-trap cleanup EXIT
-
-mv Makefile Makefile-saved
-
-ghc -M "$@"
-
-sed 's:\([a-zA-Z]*\.\(o\|hi\)\):build/\1:g' < Makefile > programs.dep
+set -e
+
+rm -f programs.dep
+
+ghc -M -dep-makefile programs.dep "$@"
+
+sed -i 's:\([a-zA-Z]*\.\(o\|hi\)\):build/\1:g' programs.dep
for PROGRAM_HS in "$@"; do
PROGRAM=$(echo ${PROGRAM_HS} | sed 's/\.hs//')
More information about the Haskell-study
mailing list