Mercurial > cpython-lru_cache-weakref
annotate BeOS/linkmodule @ 10123:bc287c6cfa23 legacy-trunk
Restructured a bit.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 08 Feb 1999 22:27:18 +0000 |
| parents | c2ec21c65d05 |
| children | 11178c8d6be2 |
| 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="" |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
27 |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
28 while [ "$#" != "0" ]; do |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
29 case "$1" in |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
30 -o) TARGET="$2"; shift; shift;; |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
31 *) ARGS="$ARGS $1"; shift;; |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
32 esac |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
33 done |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
34 |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
35 if [ "$TARGET" = "" ] ; then |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
36 echo "Usage:" |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
37 echo |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
38 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
|
39 echo |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
40 echo "Where:" |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
41 echo |
|
9643
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
42 echo " [args] normal compiler arguments" |
|
8817
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
43 exit 1 |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
44 fi |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
45 |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
46 # 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
|
47 # 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
|
48 # in this shell script easier. |
|
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
49 LIBS="-L.. -lpython1.5 -lbe -lnet -lroot" |
|
9643
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
50 |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
51 case $BE_HOST_CPU in |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
52 ppc) |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
53 # 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
|
54 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
|
55 GLUE="${GLUE_LOC}/glue-noinit.a ${GLUE_LOC}/init_term_dyn.o" |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
56 CC="mwcc -xms -export pragma -nodup" |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
57 ;; |
|
8817
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
58 |
|
9643
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
59 x86) |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
60 # 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
|
61 GLUE="" |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
62 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
|
63 ;; |
|
8817
0edd38db2288
Adding the BeOS port. More checkins to follow.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
64 |
|
9643
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
65 *) |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
66 # What the?!? |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
67 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
|
68 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
|
69 GLUE="" |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
70 CC="cc" |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
71 ;; |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
72 esac |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
73 |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
74 # Now link that shared lib... |
|
c2ec21c65d05
Changes for new BeOS port by Chris Herborth
Guido van Rossum <guido@python.org>
parents:
8817
diff
changeset
|
75 $CC -o $TARGET $ARGS $GLUE $LIBS |
