
Hi Simon,
'ghc -v' on 5.00 and 5.02 (and later versions) will tell you where the package config file is, and the rest of the info can be extracted from that.
Useful to know. However, the value of $libdir is not defined in the package config file, and that is the information I was grepping for in the driver script... Actually, `ghc -v' (with 5.02.2) seems to dump the entire package config to stdout with $libdir expanded out. This might be sufficient for me, but I need to know whether that behaviour is consistent across all versions of ghc >= 5.00?
However, you do know that we're planning to move to binary interface files, right? Perhaps we should rethink how hmake gets hold of its info about libraries - what exactly does it need to know?
The format of the interface files is irrelevant to hmake - it doesn't read them, it only checks for their existence. The basic requirement for hmake is that every module mentioned in an import must have a referent. The referent can be a source module (.hs, .lhs, .ly, .gc, etc), or if the sources are not available (e.g. Prelude, or a package module) then an interface (.hi file) will do. Source modules are scanned for further dependencies, but interface-only modules are assumed to be leaves of the graph. Regards, Malcolm