2003-08-18 15:32:13 +00:00
|
|
|
# Add the directory containing the GCC wrappers to the PATH.
|
2003-08-20 11:13:13 +00:00
|
|
|
export PATH=@OUT@/bin:$PATH
|
2003-08-18 15:32:13 +00:00
|
|
|
|
|
|
|
# Recursively add all envpkgs to the relevant environment variables.
|
|
|
|
addtoenv()
|
|
|
|
{
|
|
|
|
envpkgs="$envpkgs $1"
|
|
|
|
|
|
|
|
if test -d $1/bin; then
|
|
|
|
export PATH=$1/bin:$PATH
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -d $1/lib; then
|
2003-08-27 12:37:38 +00:00
|
|
|
export NIX_CFLAGS_LINK="-L$1/lib $NIX_CFLAGS_LINK"
|
|
|
|
export NIX_LDFLAGS="-rpath $1/lib $NIX_LDFLAGS"
|
2003-08-18 15:32:13 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test -d $1/lib/pkgconfig; then
|
|
|
|
export PKG_CONFIG_PATH=$1/lib/pkgconfig:$PKG_CONFIG_PATH
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -f $1/envpkgs; then
|
|
|
|
for i in $(cat $1/envpkgs); do
|
|
|
|
addtoenv $i
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
oldenvpkgs=$envpkgs
|
|
|
|
envpkgs=
|
|
|
|
|
|
|
|
for i in $oldenvpkgs; do
|
|
|
|
addtoenv $i
|
|
|
|
done
|
|
|
|
|
|
|
|
# Add the output as an rpath.
|
2003-08-27 12:37:38 +00:00
|
|
|
export NIX_LDFLAGS="-rpath $out/lib $NIX_LDFLAGS"
|
2003-08-18 15:32:13 +00:00
|
|
|
|
|
|
|
# Strip debug information by default.
|
|
|
|
export NIX_STRIP_DEBUG=1
|