From 0a3a1c6ae9294634b3b3f496c8bd428b79de8cfa Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 10 Nov 2006 12:47:56 +0000 Subject: fix -noprefix option for Solaris (bug 7722) --- bin/mklib | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/mklib b/bin/mklib index 0637662..7d468b1 100755 --- a/bin/mklib +++ b/bin/mklib @@ -283,7 +283,9 @@ case $ARCH in ar -ruv ${LIBNAME} ${OBJECTS} FINAL_LIBS=${LIBNAME} else - LIBNAME="lib${LIBNAME}.so" + if [ $NOPREFIX = 0 ] ; then + LIBNAME="lib${LIBNAME}.so" + fi echo "mklib: Making SunOS shared library: " ${LIBNAME} if [ "x$LINK" = "x" ] ; then @@ -333,9 +335,14 @@ case $ARCH in # for debug: #echo "mklib: linker is" ${LINK} ${OPTS} - rm -f ${LIBNAME}.${MAJOR} ${LIBNAME} - ${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS} - ln -s ${LIBNAME}.${MAJOR} ${LIBNAME} + if [ $NOPREFIX = 1 ] ; then + rm -f ${LIBNAME} + ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS} + else + rm -f ${LIBNAME}.${MAJOR} ${LIBNAME} + ${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS} + ln -s ${LIBNAME}.${MAJOR} ${LIBNAME} + fi FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}" fi ;; -- cgit v1.1 From d71a5647a3ed4aadd46edfa8a031ffc87d88c5f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Mon, 11 Dec 2006 17:36:35 +0100 Subject: minstall: Always remove destination file before (re-)creating it. This avoids issues with overwriting files that are being used. --- bin/minstall | 1 + 1 file changed, 1 insertion(+) (limited to 'bin') diff --git a/bin/minstall b/bin/minstall index 9795263..210c275 100755 --- a/bin/minstall +++ b/bin/minstall @@ -65,6 +65,7 @@ if [ $# -ge 2 ] ; then elif [ -f "$FILE" ] ; then #echo "$FILE" is a regular file + $RM "$DEST/$FILE" cp "$FILE" "$DEST" if [ $MODE ] ; then FILE=`basename "$FILE"` -- cgit v1.1 From 26626c0052cd5442f609659aa9ed25ac78e65b55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Mon, 11 Dec 2006 17:45:06 +0100 Subject: minstall: Pass correct destination file path to $RM regardless of source path. --- bin/minstall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/minstall b/bin/minstall index 210c275..819b2bc 100755 --- a/bin/minstall +++ b/bin/minstall @@ -65,7 +65,7 @@ if [ $# -ge 2 ] ; then elif [ -f "$FILE" ] ; then #echo "$FILE" is a regular file - $RM "$DEST/$FILE" + $RM "$DEST/`basename $FILE`" cp "$FILE" "$DEST" if [ $MODE ] ; then FILE=`basename "$FILE"` -- cgit v1.1