]> granicus.if.org Git - apache/commitdiff
Change instdso.sh to use libtool --install everywhere and then
authorJeff Trawick <trawick@apache.org>
Fri, 19 Apr 2002 14:04:30 +0000 (14:04 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 19 Apr 2002 14:04:30 +0000 (14:04 +0000)
clean up some stray files and symlinks that libtool leaves around
on some platforms.  This gets subversion building properly since
it needed a re-link to be performed by libtool at install time,
and the old instdso.sh logic to simply cp the DSO didn't handle
that requirement.

Submitted by: Sander Striker
Reviewed by:  Jeff Trawick

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94709 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
build/instdso.sh

diff --git a/CHANGES b/CHANGES
index 8398dd0144f306db98d2c2d3ee797aa349567eb4..02728c26f22151257d94cb6d9b96e7eb79e2ae6a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,12 @@
 Changes with Apache 2.0.36
 
+  *) Change instdso.sh to use libtool --install everywhere and then
+     clean up some stray files and symlinks that libtool leaves around
+     on some platforms.  This gets subversion building properly since
+     it needed a re-link to be performed by libtool at install time,
+     and the old instdso.sh logic to simply cp the DSO didn't handle
+     that requirement.  [Sander Striker]
+
   *) Allow VPATH builds to succeed when configured from an empty
      directory.  [Thom May <thom@planetarytramp.net>]
 
index 634a1f9189f4298d8131d49e7006a1930dc11170..09e5c5f0cd8bb043fe5ad1b8181b993f8a0bbf0f 100755 (executable)
@@ -21,38 +21,41 @@ DSOBASE=`echo $DSOARCHIVE | sed -e 's/\.la$//'`
 TARGET_NAME="$DSOBASE.so"
 
 SYS=`uname -s`
-case $SYS in
-    AIX)
-        # on AIX, shared libraries remain in storage even when
-        # all processes using them have exited; standard practice
-        # prior to installing a shared library is to rm -f first
-        CMD="rm -f $TARGETDIR/$TARGET_NAME"
-        echo $CMD
-        $CMD || exit $?
-        CMD="cp .libs/lib$DSOBASE.so.0 $TARGETDIR/$TARGET_NAME"
-        echo $CMD
-        $CMD || exit $?
-        ;;
-    HP-UX)
-        CMD="cp .libs/$DSOBASE.sl $TARGETDIR/$TARGET_NAME"
-        echo $CMD
-        $CMD || exit $?
-        ;;
-    OSF1)
-        CMD="cp .libs/lib$DSOBASE.so $TARGETDIR/$TARGET_NAME"
-        echo $CMD
-        $CMD || exit $?
-        ;;
-    OS/2|OS/390)
-        CMD="$SH_LIBTOOL --mode=install cp $DSOARCHIVE $TARGETDIR/"
-        echo $CMD
-        $CMD || exit $?
-        ;;
-    *)
-        CMD="cp .libs/$TARGET_NAME $TARGETDIR/$TARGET_NAME"
-        echo $CMD
-        $CMD || exit $?
-        ;;
-esac
+
+if test "$SYS" = "AIX"
+then
+    # on AIX, shared libraries remain in storage even when
+    # all processes using them have exited; standard practice
+    # prior to installing a shared library is to rm -f first
+    CMD="rm -f $TARGETDIR/$TARGET_NAME"
+    echo $CMD
+    $CMD || exit $?
+fi
+
+CMD="$SH_LIBTOOL --mode=install cp $DSOARCHIVE $TARGETDIR/"
+echo $CMD
+$CMD || exit $?
+
+DLNAME=`grep "^dlname" $TARGETDIR/$DSOARCHIVE | sed -e "s/dlname='\([^']*\)'/\1/"`
+LIBRARY_NAMES=`grep "library_names" $TARGETDIR/$DSOARCHIVE | sed -e "s/dlname='\([^']*\)'/\1/"`
+LIBRARY_NAMES=`echo $LIBRARY_NAMES | sed -e "s/ *$DLNAME//g"`
+
+if test -n "$LIBRARY_NAMES"
+then
+    for f in $LIBRARY_NAMES
+    do
+        rm -f $TARGETDIR/$f
+    done
+fi
+
+if test "$DLNAME" != "$TARGET_NAME"
+then
+    mv $TARGETDIR/$DLNAME $TARGETDIR/$TARGET_NAME
+fi
+
+rm -f $TARGETDIR/$DSOARCHIVE
+rm -f $TARGETDIR/$DSOBASE.a
+rm -f $TARGETDIR/lib$DSOBASE.a
+rm -f $TARGETDIR/lib$TARGET_NAME
 
 exit 0