Help! no environment variable expansion in package files ?!?

Simon Marlow simonmar at
Thu Apr 28 10:45:02 EDT 2005

On 28 April 2005 15:24, Daan Leijen wrote:

>> I suggest you use CPP ('gcc -E -undef -traditional -P' or 'cpphs').
>> This is what we use in GHC to get values into the package.conf files.
>> e.g. in a Makefile you would write something like:
> This does not work for me. For the *binary* installer for windows,
> I use a batch file (.bat). The user unzips the binary files (.hi & .o)
> in some location and runs "register.bat" which calls ghc-pkg with
> the .pkg files. This batch file sets the current directory (= the
> install directory) as an environment variable that used to be expanded
> in the .pkg files. Now, I need to generate those .pkg files inside
> the .bat file which seems a lot of extra work, if it works at all..

Ah, I see.  I'll look into re-enabling this feature in 6.4.1.

For the time being, maybe write a little Haskell program to transform
.pkg files?

> Another thing that causes me trouble is that I seem to need to
> list all exposed modules explicitly. For me, this means that I
> need to put those modules into the configure script which makes
> everything much more fragile. Is there a way to use a wildcard,
> ie. saying "expose everything in here"?

Sorry, no.  I started to implement something like that, but it turned
out to be a lot harder than I thought (can't remember why, exactly).


More information about the Libraries mailing list