--- smage/trunk/include/mtools.sminc 2013/09/24 09:01:24 5113 +++ smage/trunk/include/mtools.sminc 2013/09/24 09:03:16 5114 @@ -1,4 +1,4 @@ -# $Id$ +# $Header: /magellan-cvs/smage/include/mtools.sminc,v 1.39 2008/04/20 08:28:23 niro Exp $ # some special build tools # automatical inherit mtools.minc @@ -589,7 +589,7 @@ local dest local verbose="-v" - # check for busybox as it doesn't support 'ln -v' + # check for busybox as it doesn'tz support 'ln -v' [[ $(readlink $(which ln)) = */busybox ]] && verbose="" [[ -z $1 ]] && die "No file given" @@ -616,30 +616,16 @@ # install our library install -v -m 0755 -o root -g root ${file} ${BINDIR}/${dest} || die - # prefer scanelf - if [[ -x $(type -P scanelf) ]] + # create libtool symlinks + # 1. - library.so.1.0.0 -> library.so.1.0 + if [ "${file%.*}" != *.so ] then - local soname="$(scanelf -qBF '%S#p' ${file})" - ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/${soname} || die - else - echo -e "${COLYELLOW}minstalllib(): Warning: scanelf not found, using fallback symlink method${COLDEFAULT}" - - # create libtool symlinks - # 1. - library.so.1.0.0 -> library.so.1.0 - if [ "${file%.*}" != *.so ] - then - ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*}) || die - fi - # 2. - library.so.1.0.0 -> library.so.1 - if [ "${file%.*.*}" != *.so ] - then - ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*.*}) || die - fi - # 3. - library.so.1.0.0.0 -> library.so.1 - if [ "${file%.*.*.*}" != *.so ] - then - ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*.*.*}) || die - fi + ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*}) + fi + # 2. - library.so.1.0.0 -> library.so.1 + if [ "${file%.*.*}" != *.so ] + then + ln ${verbose} -snf $(basename ${file}) ${BINDIR}/${dest}/$(basename ${file%.*.*}) fi } @@ -683,13 +669,6 @@ local dest="$1" local opts - # enforce - if [[ $1 = -f ]] - then - opts="-f" - dest="$2" - fi - # recursive if [[ $1 = -r ]] || [[ $1 = -R ]] then @@ -906,7 +885,7 @@ -b|--no-bindir) prefix=""; argv="$2" ;; esac - #[[ -z ${argv} ]] && die "No argument given!" + [[ -z ${argv} ]] && die "No argument given!" confdir="$(dirname ${MCONFIG})" if [[ ! -d ${prefix}/${confdir} ]]