-----------------------------------------------------------------------------
--- $Id: Package.hs,v 1.2 2001/03/27 14:10:34 simonmar Exp $
+-- $Id: Package.hs,v 1.6 2002/12/18 16:29:34 simonmar Exp $
--
-- Package configuration defn.
-----------------------------------------------------------------------------
#endif
#ifdef WANT_PRETTY
+#if __GLASGOW_HASKELL__ >= 504 && !defined(INTERNAL_PRETTY)
+import Text.PrettyPrint
+#else
import Pretty
#endif
+#endif
data PackageConfig
= Package {
name :: String,
+ auto :: Bool,
import_dirs :: [String],
source_dirs :: [String],
library_dirs :: [String],
package_deps :: [String],
extra_ghc_opts :: [String],
extra_cc_opts :: [String],
- extra_ld_opts :: [String]
+ extra_ld_opts :: [String],
+ framework_dirs :: [String], -- ignored everywhere but on Darwin/MacOS X
+ extra_frameworks:: [String] -- ignored everywhere but on Darwin/MacOS X
}
-#ifdef PKG_TOOL
- deriving (Read)
-#endif
defaultPackageConfig
= Package {
name = error "defaultPackage",
+ auto = False,
import_dirs = [],
source_dirs = [],
library_dirs = [],
package_deps = [],
extra_ghc_opts = [],
extra_cc_opts = [],
- extra_ld_opts = []
+ extra_ld_opts = [],
+ framework_dirs = [],
+ extra_frameworks= []
}
-----------------------------------------------------------------------------
text "Package" $$ nest 3 (braces (
sep (punctuate comma [
text "name = " <> text (show (name pkg)),
+ text "auto = " <> text (show (auto pkg)),
dumpField "import_dirs" (import_dirs pkg),
dumpField "source_dirs" (source_dirs pkg),
dumpField "library_dirs" (library_dirs pkg),
dumpField "package_deps" (package_deps pkg),
dumpField "extra_ghc_opts" (extra_ghc_opts pkg),
dumpField "extra_cc_opts" (extra_cc_opts pkg),
- dumpField "extra_ld_opts" (extra_ld_opts pkg)
+ dumpField "extra_ld_opts" (extra_ld_opts pkg),
+ dumpField "framework_dirs" (framework_dirs pkg),
+ dumpField "extra_frameworks"(extra_frameworks pkg)
])))
dumpField :: String -> [String] -> Doc