[project @ 2001-03-27 08:29:07 by qrczak]
[ghc-hetmet.git] / ghc / driver / PackageSrc.hs
index fcd545c..bdd4c30 100644 (file)
@@ -6,20 +6,30 @@ import Utils
 
 import IO
 import System
-import Config
 import Package
 
 main :: IO ()
 main = do
   args <- getArgs
   case args of
-        [ "install"  ] -> do { putStrLn (dumpPackages (package_details True)) }
-        [ "in-place" ] -> do { putStrLn (dumpPackages (package_details False)) }
-        _ -> do hPutStr stderr "usage: pkgconf (install | in-place)\n"
-                exitWith (ExitFailure 1)
+     ("install":rest)  -> do { putStrLn (dumpPackages (package_details True rest)) }
+     ("in-place":rest) -> do { putStrLn (dumpPackages (package_details False rest)) }
+     _ -> do hPutStr stderr "usage: pkgconf (install | in-place) ...\n"
+             exitWith (ExitFailure 1)
+
+package_details :: Bool -> [String] -> [PackageConfig]
+package_details installing
+ [ cTARGETPLATFORM
+ , cCURRENT_DIR
+ , cHaveLibGmp
+ , cLibsReadline
+ , clibdir
+ , cGHC_LIB_DIR
+ , cGHC_RUNTIME_DIR
+ , cGHC_UTILS_DIR
+ , cGHC_INCLUDE_DIR
+ , cFPTOOLS_TOP_ABS ] =
 
-package_details :: Bool -> [PackageConfig]
-package_details installing =
  [
         Package {
        name           = "gmp",  -- GMP is at the bottom of the heap
@@ -96,7 +106,6 @@ package_details installing =
          , "PrelIOBase_stackOverflow_closure"
          , "PrelIOBase_heapOverflow_closure"
          , "PrelIOBase_NonTermination_closure"
-         , "PrelIOBase_PutFullMVar_closure"
          , "PrelIOBase_BlockedOnDeadMVar_closure"
          , "PrelWeak_runFinalizzerBatch_closure"
          , "__init_Prelude"
@@ -384,6 +393,6 @@ package_details installing =
          extra_ld_opts  = []
         }
    ]
-
-ghc_src_dir :: String -> String
-ghc_src_dir path = cFPTOOLS_TOP_ABS ++ '/':cCURRENT_DIR ++ '/':path
+  where
+       ghc_src_dir :: String -> String
+       ghc_src_dir path = cFPTOOLS_TOP_ABS ++ '/':cCURRENT_DIR ++ '/':path