[project @ 2001-12-06 10:45:42 by simonpj]
[ghc-hetmet.git] / ghc / compiler / main / DriverMkDepend.hs
index 970178d..d1673ff 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $Id: DriverMkDepend.hs,v 1.14 2001/08/02 16:35:10 simonmar Exp $
+-- $Id: DriverMkDepend.hs,v 1.16 2001/12/04 19:26:17 sof Exp $
 --
 -- GHC Driver
 --
@@ -19,7 +19,7 @@ import qualified SysTools
 import Module
 import Config
 import Module          ( isHomeModule )
-import Finder          ( findModule )
+import Finder          ( findModuleDep )
 import HscTypes                ( ModuleLocation(..) )
 import Util
 import Panic
@@ -53,14 +53,14 @@ depEndMarker   = "# DO NOT DELETE: End of Haskell dependencies"
 
 -- for compatibility with the old mkDependHS, we accept options of the form
 -- -optdep-f -optdep.depend, etc.
-dep_opts = [
-   (  "s",                     SepArg (add v_Dep_suffixes) ),
-   (  "f",                     SepArg (writeIORef v_Dep_makefile) ),
-   (  "w",                     NoArg (writeIORef v_Dep_warnings False) ),
-   (  "-include-prelude",      NoArg (writeIORef v_Dep_include_prelude True) )
---   (  "-exclude-module=",       Prefix (add v_Dep_exclude_mods) )
---   (  "x",                      Prefix (add v_Dep_exclude_mods) )
- ]
+dep_opts = 
+   [ (  "s",                   SepArg (add v_Dep_suffixes) )
+   , (  "f",                   SepArg (writeIORef v_Dep_makefile) )
+   , (  "w",                   NoArg (writeIORef v_Dep_warnings False) )
+   , (  "-include-prelude",    NoArg (writeIORef v_Dep_include_prelude True) )
+   , (  "-exclude-module=",       Prefix (add v_Dep_exclude_mods) )
+   , (  "x",                      Prefix (add v_Dep_exclude_mods) )
+   ]
 
 beginMkDependHS :: IO ()
 beginMkDependHS = do
@@ -169,7 +169,7 @@ findDependency is_source src imp = do
    if imp_mod `elem` excl_mods 
       then return Nothing
       else do
-       r <- findModule imp
+       r <- findModuleDep imp is_source
        case r of 
           Just (mod,loc)
                | isHomeModule mod || include_prelude