remove .a file before creating new one
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 14 Sep 2005 02:18:09 +0000 (02:18 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 14 Sep 2005 02:18:09 +0000 (02:18 +0000)
bin/mklib

index b825f62df341dc68583c11887857abf38fd2fe83..c754373e8334dca9ca4fea8bafc8e8e2e390f0ab 100755 (executable)
--- a/bin/mklib
+++ b/bin/mklib
@@ -209,10 +209,8 @@ case $ARCH in
         elif [ $STATIC = 1 ] ; then
            LIBNAME="lib${LIBNAME}"     # prefix with "lib"
             echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a
-            LINK="ar"
-            OPTS="-ru"
-            # make lib
-            ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
+            rm -f ${LIBNAME}.a
+            ar -ru ${LIBNAME}.a ${OBJECTS}
            ranlib ${LIBNAME}.a
             # finish up
             FINAL_LIBS=${LIBNAME}.a
@@ -415,6 +413,7 @@ case $ARCH in
         if [ $STATIC = 1 ] ; then
             LIBNAME="lib${LIBNAME}.a"
             echo "mklib: Making AIX static library: " ${LIBNAME}
+           rm -f ${LIBNAME}
             ar -ruv ${X64} ${LIBNAME} ${OBJECTS}
             FINAL_LIBS=${LIBNAME}
         else