X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fdocs%2Fusers_guide%2Fpackages.sgml;h=6faac0aaf6248c74e2a75a099578ab5ae06f5cba;hb=7bcdfdba58be3bd3159a87ca8413c28e3c64d147;hp=3d0bbac3754decf71f010a26b7630bf4ce65cde2;hpb=ec655d31e7a73d0e2b9eb160faa7ebd7c9fe3577;p=ghc-hetmet.git diff --git a/ghc/docs/users_guide/packages.sgml b/ghc/docs/users_guide/packages.sgml index 3d0bbac..6faac0a 100644 --- a/ghc/docs/users_guide/packages.sgml +++ b/ghc/docs/users_guide/packages.sgml @@ -13,8 +13,8 @@ are also a good way to provide convenient access to a Haskell layer over a C library. - GHC comes with several packages (see ), and packages can be added to or removed + GHC comes with several packages (see the accompanying + library documentation), and packages can be added to or removed from an existing GHC installation, using the supplied ghc-pkgghc-pkg tool, described in The ghc-pkg tool allows packages to be added or removed from a package configuration file. By default, the system-wide configuration file is used, but alternatively - packages can be added or removed from a user-specified + packages can be added, updated or removed from a user-specified configuration file using the option. An empty package configuration file consists of the string []. @@ -297,6 +297,17 @@ + + + + + Causes ghc-pkg to ignore missing + directories and libraries when adding a package, and just + go ahead and add it anyway. This might be useful if your + package installation system needs to add the package to + GHC before building and installing the files. + + When modifying the configuration file @@ -310,9 +321,9 @@ Package { name = "mypkg", - import_dirs = ["/usr/local/lib/imports/mypkg"], + import_dirs = ["${installdir}/imports/mypkg"], source_dirs = [], - library_dirs = ["/usr/local/lib"], + library_dirs = ["${installdir}"], hs_libraries = ["HSmypkg" ], extra_libraries = ["HSmypkg_cbits"], include_dirs = [], @@ -516,7 +527,50 @@ (for linking) when this package is being used. + + + framework_dirs + framework_dirs + package specification + + On Darwin/MacOS X, a list of directories containing frameworks for this + package. This corresponds to the option. + It is ignored on all other platforms. + + + + + extra_frameworks + extra_frameworks + package specification + + On Darwin/MacOS X, a list of frameworks to link to. This corresponds to the + option. Take a look at Apple's developer documentation + to find out what frameworks actually are. This entry is ignored on all other platforms. + + + + + The ghc-pkg tool performs expansion of + environment variables occurring in input package specifications. + So, if the mypkg was added to the package + database as follows: + + + $ installdir=/usr/local/lib ghc-pkg -a < mypkg.pkg + + + + The occurrence of ${installdir} is replaced + with /usr/local/lib in the package data that + is added for mypkg. + + + + This feature enables the distribution of package specification + files that can be easily configured when installing. + For examples of more package specifications, take a look at the package.conf in your GHC