id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	difficulty	ghcversion	platform
525	The install functions copy N executables N times	np		"The patch:

  Fri Aug 24 17:27:49 CEST 2007  Duncan Coutts <duncan@haskell.org>
    * Only create includes and bin dirs if necessary
    For includes, don't list the include dir in the package registration
    info unless we're actually going to install some include files.
    So we should create fewer pointless empty directories. See bug #97.

in particular this hunk:
{{{
    -GHC.installExe verbosity binPref buildPref pkg_descr
    +withExe pkg_descr $ \_ ->
    +  GHC.installExe verbosity binPref buildPref pkg_descr
}}}

introduced a bug in the case of packages with multiple executables (notable h4sh has 42 executables, leading to 1764 calls to cp/strip).
The withExe is performed twice, once here and once in Dist.Simple.GHC.

I attach a simple patch that fixes this problem by using hasExes insted of withExe.

Doing the same with 'withLib' in case of future multiple libraries
and renaming 'withExe' to 'withExes' would be nice also use these patches as you wish."	defect	closed	normal	Cabal-1.8	Cabal library	HEAD	normal	fixed			very easy (<1 hour)		
