RE: install targets on package building infrastructure

While working with Jens Petersen to improve the redhat packages for greencard, we came across a problem in the standard install targets in makefiles.
Normally, we want 'make install' to:
build the library install the library in /usr/lib/whatever (or similar place) invoke ghc-pkg to tell ghc about the package
When building a package binary though, we only want to do the first two steps and only perform the third step on the users machine.
What's the preferred way of doing this? (I figure this has already been solved for ghc and for some non-haskell packages)
You don't want to copy the way we do it for GHC (it's a hack). The right way is to do exactly what you described above: run ghc-pkg at install time. For that, you either need to generate package.conf at install-time too, with the correct paths in it, or you need to have a location-independent package.conf using eg. ${libdir}. Cheers, Simon
participants (1)
-
Simon Marlow