]> granicus.if.org Git - python/commitdiff
Chris Herborth writes:
authorGuido van Rossum <guido@python.org>
Mon, 4 Jan 1999 16:49:09 +0000 (16:49 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 4 Jan 1999 16:49:09 +0000 (16:49 +0000)
Here's a little cleanup of the BeOS/ directory for 1.5.2b2; it makes the
ar-fake, linkcc and linkmodule shell scripts a little smarter (and,
in the case of PowerPC systems, quieter :-).

BeOS/ar-fake
BeOS/linkcc

index a4c1f7f631b4d14fbb64d6aef9362477bf5ae9b2..687a9b5ff579ccaa2cddd470aaf545925266c1c2 100755 (executable)
@@ -48,6 +48,7 @@ is_abs() {
 # PowerPC or x86 systems running BeOS.
 build_lib() {
        LIB=$1 ; shift
+       SO_LIB=${LIB/.a/.so}
        SO_NAME=$1 ; shift
        CRUD_NAME=$1 ; shift
 
@@ -79,7 +80,7 @@ build_lib() {
                PARTS="$PARTS ${OBJ_PATH}${OBJ_FILE}"
        done < $CRUD_NAME
 
-       $AR_CC -o ${LIB%.a}.so $PARTS $AR_GLUE $EXTRA_LIBS > /dev/null 2>&1
+       $AR_CC -o $SO_LIB $PARTS $AR_GLUE $EXTRA_LIBS > /dev/null 2>&1
 
        return 0
 }
index e3708c150cfffe30170d82c299b2a8a47e8574cd..687c92ecd60b412c56cb1a0b3f8c562f16a9123a 100755 (executable)
@@ -36,7 +36,7 @@
 LIBRARY="$1"; shift
 
 # What we want to end up with.
-DYNAMIC=${LIBRARY%.a}.so
+DYNAMIC=${LIBRARY/.a/.so}
 LINK_DYNAMIC="-l$(basename ${DYNAMIC%.so} | sed -e s,lib,,)"
 
 # Grab the rest of the args and build them into the command used to
@@ -61,10 +61,16 @@ done
 # a little overkill, but it'll be OK.
 LIBS="-lbe -lnet -lroot"
 
+case $BE_HOST_CPU in
+       ppc)
+               LIBS="-nodup $LIBS"
+               ;;
+esac
+
 # We'll need this or the python binary won't load libpython.so... handy
 # for testing.
-( cd .. ; ln -sf `pwd` lib )
+( cd .. ; ln -sf $(pwd) lib )
 
 # Now build the python binary.
-echo "Link command: $LINK_CMD"
-$LINK_CMD
+echo "Link command: $LINK_CMD $LIBS"
+$LINK_CMD $LIBS