From cd86fd604e4a0b4bb680479f0af5274a0033ab68 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Fri, 19 Apr 2002 14:04:30 +0000 Subject: [PATCH] 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. 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 | 7 +++++ build/instdso.sh | 69 +++++++++++++++++++++++++----------------------- 2 files changed, 43 insertions(+), 33 deletions(-) diff --git a/CHANGES b/CHANGES index 8398dd0144..02728c26f2 100644 --- 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 ] diff --git a/build/instdso.sh b/build/instdso.sh index 634a1f9189..09e5c5f0cd 100755 --- a/build/instdso.sh +++ b/build/instdso.sh @@ -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 -- 2.40.0