annotate Modules/makesetup @ 16798:258dcafe2d0b legacy-trunk

Gustavo Niemeyer <niemeyer@conectiva.com>: Fixed recno support (keys are integers rather than strings). Work around DB bug that cause stdin to be closed by rnopen() when the DB file needed to exist but did not (no longer segfaults). This closes SF tracker patch #403445. Also wrapped some long lines and added whitespace around operators -- FLD.
author Fred Drake <fdrake@acm.org>
date Tue, 27 Feb 2001 18:56:46 +0000
parents 54b0aef650c5
children acd506084727
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
1 #! /bin/sh
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
2
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
3 # Convert templates into Makefile and config.c, based on the module
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
4 # definitions found in the file Setup.
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
5 #
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
6 # Usage: makesetup [-s dir] [-c file] [-m file] [Setup] ... [-n [Setup] ...]
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
7 #
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
8 # Options:
16223
54534148873e Changes for flat makefile. Building of modules happens from toplevel
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 15808
diff changeset
9 # -s directory: alternative source directory (default .)
54534148873e Changes for flat makefile. Building of modules happens from toplevel
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 15808
diff changeset
10 # -l directory: library source directory (default derived from $0)
54534148873e Changes for flat makefile. Building of modules happens from toplevel
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 15808
diff changeset
11 # -c file: alternative config.c template (default $libdir/config.c.in)
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
12 # -c -: don't write config.c
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
13 # -m file: alternative Makefile template (default ./Makefile.pre)
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
14 # -m -: don't write Makefile
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
15 #
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
16 # Remaining arguments are one or more Setup files (default ./Setup).
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
17 # Setup files after a -n option are used for their variables, modules
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
18 # and libraries but not for their .o files.
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
19 #
15342
cb11fa5b11f4 Rename Setup.in to Setup.dist, and assume that configure will create
Fred Drake <fdrake@acm.org>
parents: 13919
diff changeset
20 # See Setup.dist for a description of the format of the Setup file.
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
21 #
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
22 # The following edits are made:
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
23 #
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
24 # Copying config.c.in to config.c:
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
25 # - insert an identifying comment at the start
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
26 # - for each <module> mentioned in Setup before *noconfig*:
13669
e94c05351d43 Fix prototypes generated by makesetup, so they include '(void)' rather than
Thomas Wouters <thomas@python.org>
parents: 13407
diff changeset
27 # + insert 'extern void init<module>(void);' before MARKER 1
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
28 # + insert '{"<module>", initmodule},' before MARKER 2
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
29 #
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
30 # Copying Makefile.pre to Makefile:
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
31 # - insert an identifying comment at the start
2055
cf31eab6ab5a Another bulky set of minor changes.
Guido van Rossum <guido@python.org>
parents: 1984
diff changeset
32 # - replace _MODOBJS_ by the list of objects from Setup (except for
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
33 # Setup files after a -n option)
2055
cf31eab6ab5a Another bulky set of minor changes.
Guido van Rossum <guido@python.org>
parents: 1984
diff changeset
34 # - replace _MODLIBS_ by the list of libraries from Setup
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
35 # - for each object file mentioned in Setup, append a rule
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
36 # '<file>.o: <file>.c; <build commands>' to the end of the Makefile
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
37 # - for each module mentioned in Setup, append a rule
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
38 # which creates a shared library version to the end of the Makefile
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
39 # - for each variable definition found in Setup, insert the definition
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
40 # before the comment 'Definitions added by makesetup'
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
41
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
42 # Loop over command line options
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
43 usage='
16223
54534148873e Changes for flat makefile. Building of modules happens from toplevel
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 15808
diff changeset
44 usage: makesetup [-s srcdir] [-l libdir] [-c config.c.in] [-m Makefile.pre]
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
45 [Setup] ... [-n [Setup] ...]'
16223
54534148873e Changes for flat makefile. Building of modules happens from toplevel
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 15808
diff changeset
46 srcdir='.'
54534148873e Changes for flat makefile. Building of modules happens from toplevel
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 15808
diff changeset
47 libdir=''
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
48 config=''
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
49 makepre=''
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
50 noobjects=''
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
51 doconfig=yes
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
52 while :
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
53 do
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
54 case $1 in
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
55 -s) shift; srcdir=$1; shift;;
16223
54534148873e Changes for flat makefile. Building of modules happens from toplevel
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 15808
diff changeset
56 -l) shift; libdir=$1; shift;;
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
57 -c) shift; config=$1; shift;;
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
58 -m) shift; makepre=$1; shift;;
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
59 --) shift; break;;
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
60 -n) noobjects=yes;;
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
61 -*) echo "$usage" 1>&2; exit 2;;
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
62 *) break;;
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
63 esac
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
64 done
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
65
16223
54534148873e Changes for flat makefile. Building of modules happens from toplevel
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 15808
diff changeset
66 # Set default libdir and config if not set by command line
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
67 # (Not all systems have dirname)
16310
54b0aef650c5 Fix a typo.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16277
diff changeset
68 case $libdir in
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
69 '') case $0 in
16223
54534148873e Changes for flat makefile. Building of modules happens from toplevel
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 15808
diff changeset
70 */*) libdir=`echo $0 | sed 's,/[^/]*$,,'`;;
54534148873e Changes for flat makefile. Building of modules happens from toplevel
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 15808
diff changeset
71 *) libdir=.;;
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
72 esac;;
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
73 esac
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
74 case $config in
16223
54534148873e Changes for flat makefile. Building of modules happens from toplevel
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 15808
diff changeset
75 '') config=$libdir/config.c.in;;
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
76 esac
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
77 case $makepre in
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
78 '') makepre=Makefile.pre;;
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
79 esac
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
80
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
81 # Newline for sed i and a commands
2739
80b5c82272a2 fix NL for Linux bash bug; special processing for -u options
Guido van Rossum <guido@python.org>
parents: 2055
diff changeset
82 NL='\
80b5c82272a2 fix NL for Linux bash bug; special processing for -u options
Guido van Rossum <guido@python.org>
parents: 2055
diff changeset
83 '
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
84
15805
5415804fb345 Final part of SF patch #102409 by jlt63: Cygwin Python DLL and Shared
Guido van Rossum <guido@python.org>
parents: 15489
diff changeset
85 # Setup to link with extra libraries when makeing shared extensions.
5415804fb345 Final part of SF patch #102409 by jlt63: Cygwin Python DLL and Shared
Guido van Rossum <guido@python.org>
parents: 15489
diff changeset
86 # Currently, only Cygwin needs this baggage.
5415804fb345 Final part of SF patch #102409 by jlt63: Cygwin Python DLL and Shared
Guido van Rossum <guido@python.org>
parents: 15489
diff changeset
87 case `uname -s` in
16223
54534148873e Changes for flat makefile. Building of modules happens from toplevel
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 15808
diff changeset
88 CYGWIN*) if test $libdir = .
15805
5415804fb345 Final part of SF patch #102409 by jlt63: Cygwin Python DLL and Shared
Guido van Rossum <guido@python.org>
parents: 15489
diff changeset
89 then
16223
54534148873e Changes for flat makefile. Building of modules happens from toplevel
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 15808
diff changeset
90 ExtraLibDir=.
15805
5415804fb345 Final part of SF patch #102409 by jlt63: Cygwin Python DLL and Shared
Guido van Rossum <guido@python.org>
parents: 15489
diff changeset
91 else
5415804fb345 Final part of SF patch #102409 by jlt63: Cygwin Python DLL and Shared
Guido van Rossum <guido@python.org>
parents: 15489
diff changeset
92 ExtraLibDir='$(LIBPL)'
5415804fb345 Final part of SF patch #102409 by jlt63: Cygwin Python DLL and Shared
Guido van Rossum <guido@python.org>
parents: 15489
diff changeset
93 fi
5415804fb345 Final part of SF patch #102409 by jlt63: Cygwin Python DLL and Shared
Guido van Rossum <guido@python.org>
parents: 15489
diff changeset
94 ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";;
5415804fb345 Final part of SF patch #102409 by jlt63: Cygwin Python DLL and Shared
Guido van Rossum <guido@python.org>
parents: 15489
diff changeset
95 esac
5415804fb345 Final part of SF patch #102409 by jlt63: Cygwin Python DLL and Shared
Guido van Rossum <guido@python.org>
parents: 15489
diff changeset
96
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
97 # Main loop
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
98 for i in ${*-Setup}
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
99 do
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
100 case $i in
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
101 -n) echo '*noobjects*';;
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
102 *) echo '*doconfig*'; cat "$i";;
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
103 esac
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
104 done |
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
105 sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
106 (
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
107 rulesf="@rules.$$"
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
108 trap 'rm -f $rulesf' 0 1 2 3
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
109 echo "
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
110 # Rules appended by makedepend
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
111 " >$rulesf
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
112 DEFS=
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
113 MODS=
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
114 SHAREDMODS=
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
115 OBJS=
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
116 LIBS=
1816
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
117 LOCALLIBS=
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
118 BASELIBS=
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
119 while read line
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
120 do
10618
f7e9bc8da13d Patch by Drew Csillag for FreeBSD's sh, which doesn't automatically
Guido van Rossum <guido@python.org>
parents: 9630
diff changeset
121 # to handle backslashes for sh's that don't automatically
f7e9bc8da13d Patch by Drew Csillag for FreeBSD's sh, which doesn't automatically
Guido van Rossum <guido@python.org>
parents: 9630
diff changeset
122 # continue a read when the last char is a backslash
f7e9bc8da13d Patch by Drew Csillag for FreeBSD's sh, which doesn't automatically
Guido van Rossum <guido@python.org>
parents: 9630
diff changeset
123 while echo $line | grep '\\$' > /dev/null
f7e9bc8da13d Patch by Drew Csillag for FreeBSD's sh, which doesn't automatically
Guido van Rossum <guido@python.org>
parents: 9630
diff changeset
124 do
f7e9bc8da13d Patch by Drew Csillag for FreeBSD's sh, which doesn't automatically
Guido van Rossum <guido@python.org>
parents: 9630
diff changeset
125 read extraline
f7e9bc8da13d Patch by Drew Csillag for FreeBSD's sh, which doesn't automatically
Guido van Rossum <guido@python.org>
parents: 9630
diff changeset
126 line=`echo $line| sed s/.$//`$extraline
f7e9bc8da13d Patch by Drew Csillag for FreeBSD's sh, which doesn't automatically
Guido van Rossum <guido@python.org>
parents: 9630
diff changeset
127 done
f7e9bc8da13d Patch by Drew Csillag for FreeBSD's sh, which doesn't automatically
Guido van Rossum <guido@python.org>
parents: 9630
diff changeset
128
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
129 # Output DEFS in reverse order so first definition overrides
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
130 case $line in
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
131 *=*) DEFS="$line$NL$DEFS"; continue;;
5237
12373ba24e5d Support include statement :-(
Guido van Rossum <guido@python.org>
parents: 5104
diff changeset
132 'include '*) DEFS="$line$NL$DEFS"; continue;;
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
133 '*noobjects*')
1816
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
134 case $noobjects in
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
135 yes) ;;
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
136 *) LOCALLIBS=$LIBS; LIBS=;;
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
137 esac
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
138 noobjects=yes;
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
139 continue;;
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
140 '*doconfig*') doconfig=yes; continue;;
4063
a589cedcbef5 Support *shared* and *static* as aliases for *noconfig* and *config*.
Guido van Rossum <guido@python.org>
parents: 4032
diff changeset
141 '*static*') doconfig=yes; continue;;
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
142 '*noconfig*') doconfig=no; continue;;
4063
a589cedcbef5 Support *shared* and *static* as aliases for *noconfig* and *config*.
Guido van Rossum <guido@python.org>
parents: 4032
diff changeset
143 '*shared*') doconfig=no; continue;;
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
144 esac
1816
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
145 srcs=
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
146 cpps=
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
147 libs=
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
148 mods=
2739
80b5c82272a2 fix NL for Linux bash bug; special processing for -u options
Guido van Rossum <guido@python.org>
parents: 2055
diff changeset
149 skip=
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
150 for arg in $line
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
151 do
2739
80b5c82272a2 fix NL for Linux bash bug; special processing for -u options
Guido van Rossum <guido@python.org>
parents: 2055
diff changeset
152 case $skip in
80b5c82272a2 fix NL for Linux bash bug; special processing for -u options
Guido van Rossum <guido@python.org>
parents: 2055
diff changeset
153 libs) libs="$libs $arg"; skip=; continue;;
80b5c82272a2 fix NL for Linux bash bug; special processing for -u options
Guido van Rossum <guido@python.org>
parents: 2055
diff changeset
154 cpps) cpps="$cpps $arg"; skip=; continue;;
80b5c82272a2 fix NL for Linux bash bug; special processing for -u options
Guido van Rossum <guido@python.org>
parents: 2055
diff changeset
155 srcs) srcs="$srcs $arg"; skip=; continue;;
80b5c82272a2 fix NL for Linux bash bug; special processing for -u options
Guido van Rossum <guido@python.org>
parents: 2055
diff changeset
156 esac
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
157 case $arg in
15808
37d12021df05 SF Patch #102357 by bbum: Add support for frameworks and objective-c
Guido van Rossum <guido@python.org>
parents: 15805
diff changeset
158 -framework) libs="$libs $arg"; skip=libs;
37d12021df05 SF Patch #102357 by bbum: Add support for frameworks and objective-c
Guido van Rossum <guido@python.org>
parents: 15805
diff changeset
159 # OSX/OSXS/Darwin framework link cmd
37d12021df05 SF Patch #102357 by bbum: Add support for frameworks and objective-c
Guido van Rossum <guido@python.org>
parents: 15805
diff changeset
160 ;;
37d12021df05 SF Patch #102357 by bbum: Add support for frameworks and objective-c
Guido van Rossum <guido@python.org>
parents: 15805
diff changeset
161 -[IDUCfF]*) cpps="$cpps $arg";;
6719
faebc1940432 Understand -Xlinker option.
Guido van Rossum <guido@python.org>
parents: 6508
diff changeset
162 -Xlinker) libs="$libs $arg"; skip=libs;;
10873
9868c807732d On HP-UX, -rpath is another option taking an argument that needs to go
Guido van Rossum <guido@python.org>
parents: 10618
diff changeset
163 -rpath) libs="$libs $arg"; skip=libs;;
13919
33969751e351 Add support for FreeBSD --rpath linker option; this is equivalent to
Fred Drake <fdrake@acm.org>
parents: 13669
diff changeset
164 --rpath) libs="$libs $arg"; skip=libs;;
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
165 -[A-Zl]*) libs="$libs $arg";;
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
166 *.a) libs="$libs $arg";;
4032
893949d1d28e Recognize *.sl and *.so as library (i.e. linker) arguments
Guido van Rossum <guido@python.org>
parents: 3195
diff changeset
167 *.so) libs="$libs $arg";;
893949d1d28e Recognize *.sl and *.so as library (i.e. linker) arguments
Guido van Rossum <guido@python.org>
parents: 3195
diff changeset
168 *.sl) libs="$libs $arg";;
8334
5bfb5edc313c When a .o file is an absolute pathname, assume it's a file for which
Guido van Rossum <guido@python.org>
parents: 6719
diff changeset
169 /*.o) libs="$libs $arg";;
15805
5415804fb345 Final part of SF patch #102409 by jlt63: Cygwin Python DLL and Shared
Guido van Rossum <guido@python.org>
parents: 15489
diff changeset
170 *.def) libs="$libs $arg";;
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
171 *.o) srcs="$srcs `basename $arg .o`.c";;
1816
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
172 *.[cC]) srcs="$srcs $arg";;
15808
37d12021df05 SF Patch #102357 by bbum: Add support for frameworks and objective-c
Guido van Rossum <guido@python.org>
parents: 15805
diff changeset
173 *.m) srcs="$srcs $arg";; # Objective-C src
1816
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
174 *.cc) srcs="$srcs $arg";;
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
175 *.c++) srcs="$srcs $arg";;
5104
4109a171c901 Added .cxx and .cpp to extensions recognized as source files.
Guido van Rossum <guido@python.org>
parents: 4063
diff changeset
176 *.cxx) srcs="$srcs $arg";;
4109a171c901 Added .cxx and .cpp to extensions recognized as source files.
Guido van Rossum <guido@python.org>
parents: 4063
diff changeset
177 *.cpp) srcs="$srcs $arg";;
3195
61193c632f51 Propagate variable calls both to the linker and the compiler.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2739
diff changeset
178 \$*) libs="$libs $arg"
61193c632f51 Propagate variable calls both to the linker and the compiler.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2739
diff changeset
179 cpps="$cpps $arg";;
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
180 *.*) echo 1>&2 "bad word $arg in $line"
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
181 exit 1;;
2739
80b5c82272a2 fix NL for Linux bash bug; special processing for -u options
Guido van Rossum <guido@python.org>
parents: 2055
diff changeset
182 -u) skip=libs; libs="$libs -u";;
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
183 [a-zA-Z_]*) mods="$mods $arg";;
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
184 *) echo 1>&2 "bad word $arg in $line"
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
185 exit 1;;
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
186 esac
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
187 done
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
188 case $doconfig in
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
189 yes)
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
190 LIBS="$LIBS $libs"
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
191 MODS="$MODS $mods"
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
192 ;;
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
193 esac
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
194 case $noobjects in
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
195 yes) continue;;
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
196 esac
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
197 objs=''
1816
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
198 for src in $srcs
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
199 do
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
200 case $src in
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
201 *.c) obj=`basename $src .c`.o; cc='$(CC)';;
15489
10f6e195671d The C+ compiler is called $(CXX) these days, not CCC.
Guido van Rossum <guido@python.org>
parents: 15342
diff changeset
202 *.cc) obj=`basename $src .cc`.o; cc='$(CXX)';;
10f6e195671d The C+ compiler is called $(CXX) these days, not CCC.
Guido van Rossum <guido@python.org>
parents: 15342
diff changeset
203 *.c++) obj=`basename $src .c++`.o; cc='$(CXX)';;
10f6e195671d The C+ compiler is called $(CXX) these days, not CCC.
Guido van Rossum <guido@python.org>
parents: 15342
diff changeset
204 *.C) obj=`basename $src .C`.o; cc='$(CXX)';;
10f6e195671d The C+ compiler is called $(CXX) these days, not CCC.
Guido van Rossum <guido@python.org>
parents: 15342
diff changeset
205 *.cxx) obj=`basename $src .cxx`.o; cc='$(CXX)';;
10f6e195671d The C+ compiler is called $(CXX) these days, not CCC.
Guido van Rossum <guido@python.org>
parents: 15342
diff changeset
206 *.cpp) obj=`basename $src .cpp`.o; cc='$(CXX)';;
15808
37d12021df05 SF Patch #102357 by bbum: Add support for frameworks and objective-c
Guido van Rossum <guido@python.org>
parents: 15805
diff changeset
207 *.m) obj=`basename $src .m`.o; cc='$(CXX)';; # Obj-C
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
208 *) continue;;
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
209 esac
16223
54534148873e Changes for flat makefile. Building of modules happens from toplevel
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 15808
diff changeset
210 obj="$srcdir/$obj"
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
211 objs="$objs $obj"
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
212 case $src in
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
213 glmodule.c) ;;
9076
c06272384f11 Michael P. Reilly suggested this fix: makesetup wants to prepend
Guido van Rossum <guido@python.org>
parents: 8334
diff changeset
214 /*) ;;
13383
3ff022e1b95d don't prepend "$(srcdir)/" to paths beginning with "$" since they are likely
Skip Montanaro <skip@pobox.com>
parents: 10873
diff changeset
215 \$*) ;;
16223
54534148873e Changes for flat makefile. Building of modules happens from toplevel
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 15808
diff changeset
216 *) src='$(srcdir)/'"$srcdir/$src";;
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
217 esac
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
218 case $doconfig in
16277
16e21772ca3f - Use PY_CFLAGS when compile modules that will be part of the interpreter.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16223
diff changeset
219 no) cc="$cc \$(CCSHARED) \$(CFLAGS)";;
16e21772ca3f - Use PY_CFLAGS when compile modules that will be part of the interpreter.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16223
diff changeset
220 *)
16e21772ca3f - Use PY_CFLAGS when compile modules that will be part of the interpreter.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16223
diff changeset
221 cc="$cc \$(PY_CFLAGS)";;
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
222 esac
16277
16e21772ca3f - Use PY_CFLAGS when compile modules that will be part of the interpreter.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16223
diff changeset
223 rule="$obj: $src; $cc $cpps -c $src -o $obj"
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
224 echo "$rule" >>$rulesf
1816
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
225 done
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
226 case $doconfig in
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
227 yes) OBJS="$OBJS $objs";;
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
228 esac
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
229 for mod in $mods
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
230 do
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
231 case $objs in
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
232 *$mod.o*) base=$mod;;
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
233 *) base=${mod}module;;
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
234 esac
16277
16e21772ca3f - Use PY_CFLAGS when compile modules that will be part of the interpreter.
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16223
diff changeset
235 file="$srcdir/$base\$(SO)"
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
236 case $doconfig in
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
237 no) SHAREDMODS="$SHAREDMODS $file";;
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
238 esac
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
239 rule="$file: $objs"
15805
5415804fb345 Final part of SF patch #102409 by jlt63: Cygwin Python DLL and Shared
Guido van Rossum <guido@python.org>
parents: 15489
diff changeset
240 rule="$rule; \$(LDSHARED) $objs $libs $ExtraLibs -o $file"
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
241 echo "$rule" >>$rulesf
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
242 done
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
243 done
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
244
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
245 case $SHAREDMODS in
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
246 '') ;;
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
247 *) DEFS="SHAREDMODS=$SHAREDMODS$NL$DEFS";;
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
248 esac
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
249
1816
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
250 case $noobjects in
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
251 yes) BASELIBS=$LIBS;;
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
252 *) LOCALLIBS=$LIBS;;
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
253 esac
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
254 LIBS='$(LOCALMODLIBS) $(BASEMODLIBS)'
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
255 DEFS="BASEMODLIBS=$BASELIBS$NL$DEFS"
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
256 DEFS="LOCALMODLIBS=$LOCALLIBS$NL$DEFS"
3b4703173caf * Modules/makesetup: support C++ files now; these should be given
Guido van Rossum <guido@python.org>
parents: 1746
diff changeset
257
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
258 EXTDECLS=
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
259 INITBITS=
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
260 for mod in $MODS
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
261 do
13669
e94c05351d43 Fix prototypes generated by makesetup, so they include '(void)' rather than
Thomas Wouters <thomas@python.org>
parents: 13407
diff changeset
262 EXTDECLS="${EXTDECLS}extern void init$mod(void);$NL"
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
263 INITBITS="${INITBITS} {\"$mod\", init$mod},$NL"
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
264 done
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
265
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
266
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
267 case $config in
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
268 -) ;;
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
269 *) sed -e "
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
270 1i$NL/* Generated automatically from $config by makesetup. */
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
271 /MARKER 1/i$NL$EXTDECLS
9588
38023a425e48 Add DL_EXPORT() to all modules that could possibly be used
Guido van Rossum <guido@python.org>
parents: 9076
diff changeset
272
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
273 /MARKER 2/i$NL$INITBITS
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
274
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
275 " $config >config.c
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
276 ;;
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
277 esac
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
278
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
279 case $makepre in
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
280 -) ;;
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
281 *) sedf="@sed.in.$$"
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
282 trap 'rm -f $sedf' 0 1 2 3
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
283 echo "1i\\" >$sedf
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
284 str="# Generated automatically from $makepre by makesetup."
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
285 echo "$str" >>$sedf
2055
cf31eab6ab5a Another bulky set of minor changes.
Guido van Rossum <guido@python.org>
parents: 1984
diff changeset
286 echo "s%_MODOBJS_%$OBJS%" >>$sedf
cf31eab6ab5a Another bulky set of minor changes.
Guido van Rossum <guido@python.org>
parents: 1984
diff changeset
287 echo "s%_MODLIBS_%$LIBS%" >>$sedf
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
288 echo "/Definitions added by makesetup/a$NL$NL$DEFS" >>$sedf
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
289 sed -f $sedf $makepre >Makefile
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
290 cat $rulesf >>Makefile
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
291 rm -f $sedf
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
292 ;;
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1469
diff changeset
293 esac
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
294
1880
05fb9dec2c9c Support shared library creation.
Guido van Rossum <guido@python.org>
parents: 1849
diff changeset
295 rm -f $rulesf
1469
3059218f630b Added some files to new module
Guido van Rossum <guido@python.org>
parents:
diff changeset
296 )