From a68338c1a0244559e7b1503cf482492ab3bfba4c Mon Sep 17 00:00:00 2001 From: sof Date: Sun, 3 Feb 2002 17:08:55 +0000 Subject: [PATCH] [project @ 2002-02-03 17:08:55 by sof] document the environment variable expansion done in input package specifications --- ghc/docs/users_guide/packages.sgml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/ghc/docs/users_guide/packages.sgml b/ghc/docs/users_guide/packages.sgml index 3d0bbac..a4fbd65 100644 --- a/ghc/docs/users_guide/packages.sgml +++ b/ghc/docs/users_guide/packages.sgml @@ -177,7 +177,7 @@ 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 []. @@ -310,9 +310,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 = [], @@ -517,6 +517,27 @@ + + + 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 -- 1.7.10.4