Mercurial > cpython-lru_cache-weakref
annotate BeOS/linkmodule @ 15164:8930ec3bc00a legacy-trunk
Added additional test cases for pulldom modifications.
| author | Lars Gustäbel <lars@gustaebel.de> |
|---|---|
| date | Wed, 11 Oct 2000 22:36:00 +0000 |
| parents | 1dd72a92e922 |
| children |
| rev | line source |
|---|---|
|
8817
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
1 #! /bin/sh |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
2 # |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
3 # linkmodule for Python |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
4 # Chris Herborth (chrish@qnx.com) |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
5 # |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
6 # This is covered by the same copyright/licensing terms as the rest of |
|
9643
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
7 # Python. |
|
8817
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
8 # |
|
9643
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
9 # Shell script to build shared library versions of the modules; since |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
10 # the change to the *ahem* "proper" import/export mechanism, this script |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
11 # is much simpler. It handles PowerPC and x86, too. |
|
8817
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
12 # |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
13 # This is called by the Modules/Makefile as $(LDSHARED): |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
14 # |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
15 # $(LDSHARED) foomodule.o -o foomodule$(SO) |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
16 # |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
17 # Could also be called as: |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
18 # |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
19 # $(LDSHARED) readline.o -L/boot/home/config/lib -lreadline -ltermcap \ |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
20 # -o readline$(SO) |
|
9643
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
21 # |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
22 # so we need to preserve the arguments, sort of. |
|
8817
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
23 |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
24 # Make sure we got reasonable arguments. |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
25 TARGET="" |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
26 ARGS="" |
|
15048
1dd72a92e922
Donn Cave <donn@u.washington.edu>:
Fred Drake <fdrake@acm.org>
parents:
14001
diff
changeset
|
27 VERSION=2.0 |
|
8817
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
28 |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
29 while [ "$#" != "0" ]; do |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
30 case "$1" in |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
31 -o) TARGET="$2"; shift; shift;; |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
32 *) ARGS="$ARGS $1"; shift;; |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
33 esac |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
34 done |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
35 |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
36 if [ "$TARGET" = "" ] ; then |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
37 echo "Usage:" |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
38 echo |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
39 echo " $0 [args] -o foomodule.so [args] foomodule.o [args]" |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
40 echo |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
41 echo "Where:" |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
42 echo |
|
9643
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
43 echo " [args] normal compiler arguments" |
|
8817
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
44 exit 1 |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
45 fi |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
46 |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
47 # The shared libraries and glue objects we need to link against; these |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
48 # libs are overkill for most of the standard modules, but it makes life |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
49 # in this shell script easier. |
|
14001
73d976afa8d4
Chris Herborth <chrish@pobox.com>:
Fred Drake <fdrake@acm.org>
parents:
10455
diff
changeset
|
50 LIBS="-L.. -lpython$VERSION -lbe -lnet -lroot" |
|
9643
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
51 |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
52 case $BE_HOST_CPU in |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
53 ppc) |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
54 # Boy, do we need a lot of crap... |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
55 GLUE_LOC=/boot/develop/lib/ppc |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
56 GLUE="${GLUE_LOC}/glue-noinit.a ${GLUE_LOC}/init_term_dyn.o" |
|
10455
11178c8d6be2
Chris Herborth: the new compiler in R4.1 needs some new options to work...
Guido van Rossum <guido@python.org>
parents:
9643
diff
changeset
|
57 case $(uname -r) in |
|
11178c8d6be2
Chris Herborth: the new compiler in R4.1 needs some new options to work...
Guido van Rossum <guido@python.org>
parents:
9643
diff
changeset
|
58 4.0*) CC="mwcc -xms -export pragma -nodup" ;; |
|
11178c8d6be2
Chris Herborth: the new compiler in R4.1 needs some new options to work...
Guido van Rossum <guido@python.org>
parents:
9643
diff
changeset
|
59 *) CC="mwcc -shared -export pragma -nodup" ;; |
|
11178c8d6be2
Chris Herborth: the new compiler in R4.1 needs some new options to work...
Guido van Rossum <guido@python.org>
parents:
9643
diff
changeset
|
60 esac |
|
9643
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
61 ;; |
|
8817
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
62 |
|
9643
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
63 x86) |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
64 # We don't need as much crap here... |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
65 GLUE="" |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
66 CC="gcc -nostart -Wl,-soname=${TARGET}" |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
67 ;; |
|
8817
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
68 |
|
9643
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
69 *) |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
70 # What the?!? |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
71 echo "$0 doesn't support $BE_HOST_CPU systems..." |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
72 echo "You're on your own... I'd be surprised if this works." |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
73 GLUE="" |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
74 CC="cc" |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
75 ;; |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
76 esac |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
77 |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
78 # Now link that shared lib... |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
79 $CC -o $TARGET $ARGS $GLUE $LIBS |
