Debian Codegraph @

cpython27/Modules/ar_beos

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2 #
3 # Truly fake ar, using a directory to store object files.
4 #
5 # Donn Cave, [email protected]
6
7 usage='Usage: ar-fake cr libpython.dir obj.o ...
8 ar-fake d libpython.dir obj.o ...
9 ar-fake so libpython.dir libpython.so'
10
11 case $# in
12 0|1|2)
13 echoscip-shell system . . echo. "$usage" >&2
14 exit 1
15 ;;
16 esac
17
18 command=$1
19 library=$2
20 shift 2
21
22 case $command in
23 cr)
24 if testscip-shell system . . test. -d $library
25 then :
26 else
27 mkdirscip-shell system . . mkdir. $library
28 fi
29 if cpscip-shell system . . cp. -p $* $library
30 then
31 # To force directory modify date, create or delete a file.
32 if testscip-shell system . . test. -e $library/.tch
33 then rmscip-shell system . . rm. $library/.tch
34 else echoscip-shell system . . echo. tch > $library/.tch
35 fi
36 exit 0
37 fi
38 ;;
39 d)
40 if testscip-shell system . . test. -d $library
41 then
42 cd $library
43 rmscip-shell system . . rm. -f $*
44 fi
45 ;;
46 so)
47 case $BE_HOST_CPU in
48 ppc)
49 # In case your libpython.a refers to any exotic libraries,
50 # mwld needs to know that here. The following hack makes
51 # a couple of assumptions about Modules/Makefile. If it
52 # doesn't work, you may as well add the necessary libraries
53 # here explicitly instead.
54 extralibs=$(
55 (cd Modules; makescip-shell system . . make. -f Makefile -n link) |
56 sedscip-shell system . . sed. -n 's/.*\.so \(.*\) -o python.*/\1/p'
57 )
58 mwld -xms -export pragma -nodup -o $1 $library/* $extralibs
59 ;;
60 x86)
61 ldscip-shell system . . ld. -shared -soname $(basenamescip-shell system . . basename. $1) -o $1 $library/*
62 ;;
63 esac
64 status=$?
65 cd $(dirnamescip-shell system . . dirname. $1)
66 lnscip-shell system . . ln. -sf $PWD lib
67 exit $status
68 ;;
69 *)
70 echoscip-shell system . . echo. "$usage" >&2
71 exit 1
72 ;;
73 esac