install targets on package building infrastructure

Alastair Reid alastair@reid-consulting-uk.ltd.uk
Thu, 5 Jun 2003 14:05:13 +0100


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)

--
Alastair