summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-08-24 23:19:04 +0000
committerMike Frysinger <vapier@gentoo.org>2005-08-24 23:19:04 +0000
commitd316dc11ce9e1bd136b9e332d733d5b2baee7aa2 (patch)
tree67abf2198c917d2a8163f22608e2366fbf7111a5 /sys-devel/binutils-config
parentPre-masked alsa 1.0.10_rc1 ebuilds. (diff)
downloadgentoo-2-d316dc11ce9e1bd136b9e332d733d5b2baee7aa2.tar.gz
gentoo-2-d316dc11ce9e1bd136b9e332d733d5b2baee7aa2.tar.bz2
gentoo-2-d316dc11ce9e1bd136b9e332d733d5b2baee7aa2.zip
if binutils was configure without --enable-shared, then the include path wont exist so dont barf
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'sys-devel/binutils-config')
-rwxr-xr-xsys-devel/binutils-config/files/binutils-config-1.825
1 files changed, 14 insertions, 11 deletions
diff --git a/sys-devel/binutils-config/files/binutils-config-1.8 b/sys-devel/binutils-config/files/binutils-config-1.8
index f2bd18a9665a..a7337066ce7c 100755
--- a/sys-devel/binutils-config/files/binutils-config-1.8
+++ b/sys-devel/binutils-config/files/binutils-config-1.8
@@ -1,12 +1,14 @@
#!/bin/bash
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-1.8,v 1.4 2005/06/24 21:55:28 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-1.8,v 1.5 2005/08/24 23:19:04 vapier Exp $
# Format of /etc/env.d/binutils/:
# config-TARGET: CURRENT=version for TARGET
# TARGET-VER: has a TARGET and VER variable
+cd /
+
trap ":" INT QUIT TSTP
source /etc/init.d/functions.sh || {
@@ -119,16 +121,17 @@ switch_profile() {
# Generate include symlinks
#
INCPATH=${LIBPATH}/include
- cd "${ROOT}/${INCPATH}" || exit 1
- if [[ ${TARGET} == ${HOST} ]] ; then
- dstinc=${ROOT}/usr/include
- else
- dstinc=${ROOT}/usr/${TARGET}/include
+ if [[ -d ${ROOT}/${INCPATH} ]] ; then
+ if [[ ${TARGET} == ${HOST} ]] ; then
+ dstinc=${ROOT}/usr/include
+ else
+ dstinc=${ROOT}/usr/${TARGET}/include
+ fi
+ mkdir -p "${dstinc}"
+ for x in * ; do
+ ln -sf "${INCPATH}/${x}" "${dstinc}/${x}"
+ done
fi
- mkdir -p "${dstinc}"
- for x in * ; do
- ln -sf "${INCPATH}/${x}" "${dstinc}/${x}"
- done
#
# Make sure proper paths get updated
@@ -286,7 +289,7 @@ while [[ $# -gt 0 ]] ; do
exit 0
;;
-v|--version)
- cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-1.8,v 1.4 2005/06/24 21:55:28 vapier Exp $"
+ cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-1.8,v 1.5 2005/08/24 23:19:04 vapier Exp $"
cvsver=${cvsver##*binutils-config-}
echo "binutils-config-${cvsver%%,v *}"
exit 0