diff options
author | Jeff Trawick <trawick@apache.org> | 2002-04-19 16:04:30 +0200 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2002-04-19 16:04:30 +0200 |
commit | 5d2a64791c999b32bb87bea031442f26d77e8a38 (patch) | |
tree | 565d6b807035dba6d3720f7779c275f4fba596fd /build/instdso.sh | |
parent | fix a typo in a comment for ap_get_client_block() (diff) | |
download | apache2-5d2a64791c999b32bb87bea031442f26d77e8a38.tar.xz apache2-5d2a64791c999b32bb87bea031442f26d77e8a38.zip |
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
Diffstat (limited to 'build/instdso.sh')
-rwxr-xr-x | build/instdso.sh | 69 |
1 files changed, 36 insertions, 33 deletions
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 |