| 1 | # Copyright 1999-2004 Gentoo Foundation |
1 | # Copyright 1999-2004 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.3 2004/11/04 13:13:59 kosmikus Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.4 2004/11/04 14:16:14 kosmikus Exp $ |
| 4 | # |
4 | # |
| 5 | # Author: Andres Loeh <kosmikus@gentoo.org> |
5 | # Author: Andres Loeh <kosmikus@gentoo.org> |
| 6 | # |
6 | # |
| 7 | # This eclass helps with the Glasgow Haskell Compiler's package |
7 | # This eclass helps with the Glasgow Haskell Compiler's package |
| 8 | # configuration utility. |
8 | # configuration utility. |
| … | |
… | |
| 53 | |
53 | |
| 54 | # make a ghci foo.o file from a libfoo.a file |
54 | # make a ghci foo.o file from a libfoo.a file |
| 55 | ghc-makeghcilib() { |
55 | ghc-makeghcilib() { |
| 56 | local outfile |
56 | local outfile |
| 57 | outfile="$(dirname $1)/$(basename $1 | sed 's:^lib\?\(.*\)\.a$:\1.o:')" |
57 | outfile="$(dirname $1)/$(basename $1 | sed 's:^lib\?\(.*\)\.a$:\1.o:')" |
| 58 | ld --relocatable --discard-all --output="${outfile}" $1 |
58 | ld --relocatable --discard-all --output="${outfile}" --whole-archive $1 |
| 59 | } |
59 | } |
| 60 | |
60 | |
| 61 | # creates a local (package-specific) package |
61 | # creates a local (package-specific) package |
| 62 | # configuration file; the arguments should be |
62 | # configuration file; the arguments should be |
| 63 | # uninstalled package description files, each |
63 | # uninstalled package description files, each |